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,6 +101,8 @@ int main(int argc, char **argv)
uloop_run(); uloop_run();
done: done:
uloop_done(); uloop_done();
if (srv)
srv->free(srv); srv->free(srv);
return 0; return 0;