2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add missing check for calloc(3) return value.

This commit is contained in:
Todd C. Miller
2015-07-14 13:56:29 -06:00
parent 5125f82c4e
commit ff5b6dbb60

View File

@@ -2797,7 +2797,8 @@ sudo_ldap_result_alloc(void)
debug_decl(sudo_ldap_result_alloc, SUDOERS_DEBUG_LDAP)
result = calloc(1, sizeof(*result));
STAILQ_INIT(&result->searches);
if (result != NULL)
STAILQ_INIT(&result->searches);
debug_return_ptr(result);
}