2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-01 06:45:10 +00:00

Add missing return statement when NO_LEAKS is not defined.

This commit is contained in:
Todd C. Miller
2021-02-07 13:37:21 -07:00
parent c140b5942c
commit c19cb388bc
2 changed files with 6 additions and 2 deletions

View File

@@ -3933,13 +3933,15 @@ parser_leak_remove(enum parser_leak_types type, void *v)
} }
/* If this happens, there is a bug in the leak tracking code. */ /* If this happens, there is a bug in the leak tracking code. */
sudo_warnx("%s: unable to find %p, type %d", __func__, v, type); sudo_warnx("%s: unable to find %p, type %d", __func__, v, type);
return false; debug_return_bool(false);
found: found:
if (prev == NULL) if (prev == NULL)
SLIST_REMOVE_HEAD(&parser_leak_list, entries); SLIST_REMOVE_HEAD(&parser_leak_list, entries);
else else
SLIST_REMOVE_AFTER(prev, entries); SLIST_REMOVE_AFTER(prev, entries);
free(entry); free(entry);
debug_return_bool(true);
#else
return true; return true;
#endif /* NO_LEAKS */ #endif /* NO_LEAKS */
} }

View File

@@ -1782,13 +1782,15 @@ parser_leak_remove(enum parser_leak_types type, void *v)
} }
/* If this happens, there is a bug in the leak tracking code. */ /* If this happens, there is a bug in the leak tracking code. */
sudo_warnx("%s: unable to find %p, type %d", __func__, v, type); sudo_warnx("%s: unable to find %p, type %d", __func__, v, type);
return false; debug_return_bool(false);
found: found:
if (prev == NULL) if (prev == NULL)
SLIST_REMOVE_HEAD(&parser_leak_list, entries); SLIST_REMOVE_HEAD(&parser_leak_list, entries);
else else
SLIST_REMOVE_AFTER(prev, entries); SLIST_REMOVE_AFTER(prev, entries);
free(entry); free(entry);
debug_return_bool(true);
#else
return true; return true;
#endif /* NO_LEAKS */ #endif /* NO_LEAKS */
} }