From: Todd C. Miller Date: Thu, 11 Nov 2010 21:09:34 +0000 (-0500) Subject: Use efree() not free() and remove malloc.h include since we never X-Git-Tag: SUDO_1_7_5~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6c71398b0c0e1e34e41220695de6236ed1b84e9;p=sudo Use efree() not free() and remove malloc.h include since we never directly call malloc() or free(). --HG-- branch : 1.7 --- diff --git a/ldap.c b/ldap.c index fe713ee8f..ce742b38a 100644 --- a/ldap.c +++ b/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 */ @@ -303,7 +300,7 @@ sudo_ldap_conf_add_ports() } } - free(ldap_conf.host); + efree(ldap_conf.host); ldap_conf.host = estrdup(hostbuf); return; @@ -383,7 +380,7 @@ sudo_ldap_parse_uri(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));