2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

Use efree() not free() and remove malloc.h include since we never

directly call malloc() or free().
This commit is contained in:
Todd C. Miller
2010-11-11 16:10:57 -05:00
parent 4733872cb0
commit 8597c39194

View 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));