diff --git a/minidlna.c b/minidlna.c index c9303b1..7933f54 100644 --- a/minidlna.c +++ b/minidlna.c @@ -380,6 +380,7 @@ rescan: sqlite3_close(db); log_close(); freeoptions(); + free(children); exit(EXIT_SUCCESS); } else if (*scanner_pid < 0) @@ -1317,6 +1318,8 @@ shutdown: if (sbeacon >= 0) close(sbeacon); #endif + if (smonitor >= 0) + close(smonitor); for (i = 0; i < n_lan_addr; i++) {