From: Todd C. Miller Date: Thu, 11 Nov 2010 21:10:57 +0000 (-0500) Subject: Use efree() not free() and remove malloc.h include since we never X-Git-Tag: SUDO_1_8_0~173 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8597c391943fd40d062a3be93c644a45bcb4d79a;p=sudo Use efree() not free() and remove malloc.h include since we never directly call malloc() or free(). --- diff --git a/plugins/sudoers/ldap.c b/plugins/sudoers/ldap.c index 0bc02042e..ca7f783da 100644 --- a/plugins/sudoers/ldap.c +++ b/plugins/sudoers/ldap.c @@ -37,9 +37,6 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ -#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) -# include -#endif /* HAVE_MALLOC_H && !STDC_HEADERS */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ @@ -302,7 +299,7 @@ sudo_ldap_conf_add_ports(void) } } - free(ldap_conf.host); + efree(ldap_conf.host); ldap_conf.host = estrdup(hostbuf); return; @@ -381,7 +378,7 @@ sudo_ldap_parse_uri(const struct ldap_config_list_str *uri_list) ldap_conf.ssl_mode = SUDO_LDAP_SSL; } - free(ldap_conf.host); + efree(ldap_conf.host); ldap_conf.host = estrdup(hostbuf); efree(buf); } while ((uri_list = uri_list->next));