mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
r14397: Fix deadcode in coverity error #1.
Jeremy. (This used to be commit 4a4953c4d27cd1e925c9afe24fa49b015ce033ec)
This commit is contained in:
parent
be2bc3147c
commit
85d3b74844
@ -191,12 +191,14 @@ static char *debug_list_class_names_and_levels(void)
|
||||
char *b;
|
||||
BOOL err = False;
|
||||
|
||||
if (DEBUGLEVEL_CLASS == &debug_all_class_hack)
|
||||
if (DEBUGLEVEL_CLASS == &debug_all_class_hack) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
list = SMB_CALLOC_ARRAY(char *, debug_num_classes + 1);
|
||||
if (!list)
|
||||
if (!list) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* prepare strings */
|
||||
for (i = 0, dim = 0; i < debug_num_classes; i++) {
|
||||
@ -227,13 +229,12 @@ static char *debug_list_class_names_and_levels(void)
|
||||
|
||||
done:
|
||||
/* free strings list */
|
||||
for (i = 0; i < debug_num_classes; i++)
|
||||
if (list[i]) free(list[i]);
|
||||
free(list);
|
||||
for (i = 0; i < debug_num_classes; i++) {
|
||||
SAFE_FREE(list[i]);
|
||||
}
|
||||
SAFE_FREE(list);
|
||||
|
||||
if (err) {
|
||||
if (buf)
|
||||
free(buf);
|
||||
return NULL;
|
||||
} else {
|
||||
return buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user