example:helloworld.c: Fix bug: May be reference a NULL pointer.

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2018-07-18 21:51:11 +08:00
parent 69d7e91fb6
commit 90fad37a4c
1 changed files with 3 additions and 1 deletions

View File

@ -101,7 +101,9 @@ int main(int argc, char **argv)
uloop_run();
done:
uloop_done();
srv->free(srv);
if (srv)
srv->free(srv);
return 0;
}