From: Sebastian Harl Date: Tue, 29 Apr 2014 17:48:19 +0000 (+0200) Subject: sysdbd: Don't leak memory when aborting from the main loop. X-Git-Tag: sysdb-0.1.0~64 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d5819c800a3122fc2f3b0124f97e0309680d4e2c;p=sysdb.git sysdbd: Don't leak memory when aborting from the main loop. --- diff --git a/src/tools/sysdbd/main.c b/src/tools/sysdbd/main.c index 4af2de1..7dc9f26 100644 --- a/src/tools/sysdbd/main.c +++ b/src/tools/sysdbd/main.c @@ -292,6 +292,10 @@ main_loop(void) } } + /* clean up in case we exited the loop on error */ + pthread_kill(backend_thread, SIGINT); + pthread_join(backend_thread, NULL); + sdb_fe_sock_destroy(sock); return status; } /* main_loop */