]> granicus.if.org Git - sudo/commitdiff
Use efree() not free() and remove malloc.h include since we never
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 11 Nov 2010 21:09:34 +0000 (16:09 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 11 Nov 2010 21:09:34 +0000 (16:09 -0500)
directly call malloc() or free().

--HG--
branch : 1.7

ldap.c

diff --git a/ldap.c b/ldap.c
index fe713ee8f61146d9af28f0b7beec29941b02dc96..ce742b38a03fce86168ec8d10b1dd1c68004f739 100644 (file)
--- a/ldap.c
+++ b/ldap.c
@@ -37,9 +37,6 @@
 #ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
-#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
-# include <malloc.h>
-#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #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));