mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
debug: fixed a valgrind error
Thanks to Volker for spotting this one! Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Fri Mar 4 03:09:52 CET 2011 on sn-devel-104
This commit is contained in:
parent
e63f0dfba1
commit
3560db3da3
@ -255,6 +255,7 @@ int debug_add_class(const char *classname)
|
||||
int ndx;
|
||||
int *new_class_list;
|
||||
char **new_name_list;
|
||||
int default_level;
|
||||
|
||||
if (!classname)
|
||||
return -1;
|
||||
@ -274,12 +275,14 @@ int debug_add_class(const char *classname)
|
||||
new_class_list = DEBUGLEVEL_CLASS;
|
||||
}
|
||||
|
||||
default_level = DEBUGLEVEL_CLASS[DBGC_ALL];
|
||||
|
||||
new_class_list = talloc_realloc(NULL, new_class_list, int, ndx + 1);
|
||||
if (!new_class_list)
|
||||
return -1;
|
||||
DEBUGLEVEL_CLASS = new_class_list;
|
||||
|
||||
DEBUGLEVEL_CLASS[ndx] = DEBUGLEVEL_CLASS[DBGC_ALL];
|
||||
DEBUGLEVEL_CLASS[ndx] = default_level;
|
||||
|
||||
new_name_list = talloc_realloc(NULL, classname_table, char *, ndx + 1);
|
||||
if (!new_name_list)
|
||||
|
Loading…
x
Reference in New Issue
Block a user