]> 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:10:57 +0000 (16:10 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 11 Nov 2010 21:10:57 +0000 (16:10 -0500)
directly call malloc() or free().

plugins/sudoers/ldap.c

index 0bc02042e94c6369945bcd26c34090ab8ae174a1..ca7f783dae84285f9ae4971fdcf65fe4b28e5246 100644 (file)
@@ -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 */
@@ -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));