debug: add resource cleanup for per debug-class logfiles
authorRalph Boehme <slow@samba.org>
Wed, 12 Dec 2018 12:09:03 +0000 (13:09 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 20 Dec 2018 02:19:27 +0000 (03:19 +0100)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/debug.c

index d01bde7..780ce9a 100644 (file)
@@ -870,6 +870,7 @@ bool debug_parse_levels(const char *params_str)
        /* Array is debug_num_classes long */
        for (i = DBGC_ALL+1; i < debug_num_classes; i++) {
                dbgc_config[i].loglevel = dbgc_config[DBGC_ALL].loglevel;
+               TALLOC_FREE(dbgc_config[i].logfile);
        }
 
        while (tok != NULL) {