util/debug: Use talloc_autofree_context() instead of NULL to reduce the noise
authorKamen Mazdrashki <kamenim@samba.org>
Fri, 5 Sep 2014 13:04:17 +0000 (15:04 +0200)
committerKamen Mazdrashki <kamenim@samba.org>
Wed, 1 Oct 2014 00:35:54 +0000 (02:35 +0200)
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
lib/util/debug.c

index 00595957aa6f3f299e3d34e493d0536f603e9023..86e71b51fac5664029cc9353e2b3c712375b5f8a 100644 (file)
@@ -281,14 +281,14 @@ int debug_add_class(const char *classname)
 
        default_level = DEBUGLEVEL_CLASS[DBGC_ALL];
 
-       new_class_list = talloc_realloc(NULL, new_class_list, int, ndx + 1);
+       new_class_list = talloc_realloc(talloc_autofree_context(), new_class_list, int, ndx + 1);
        if (!new_class_list)
                return -1;
        DEBUGLEVEL_CLASS = new_class_list;
 
        DEBUGLEVEL_CLASS[ndx] = default_level;
 
-       new_name_list = talloc_realloc(NULL, classname_table, char *, ndx + 1);
+       new_name_list = talloc_realloc(talloc_autofree_context(), classname_table, char *, ndx + 1);
        if (!new_name_list)
                return -1;
        classname_table = new_name_list;
@@ -510,7 +510,7 @@ void debug_set_logfile(const char *name)
                return;
        }
        TALLOC_FREE(state.debugf);
-       state.debugf = talloc_strdup(NULL, name);
+       state.debugf = talloc_strdup(talloc_autofree_context(), name);
 }
 
 static void debug_close_fd(int fd)