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:
@@ -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 */
|
||||||
}
|
}
|
||||||
|
@@ -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 */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user