mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 07:15:27 +00:00
Use efree() not free() and remove malloc.h include since we never
directly call malloc() or free().
This commit is contained in:
@@ -37,9 +37,6 @@
|
|||||||
#ifdef HAVE_STRINGS_H
|
#ifdef HAVE_STRINGS_H
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#endif /* HAVE_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
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif /* HAVE_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);
|
ldap_conf.host = estrdup(hostbuf);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -381,7 +378,7 @@ sudo_ldap_parse_uri(const struct ldap_config_list_str *uri_list)
|
|||||||
ldap_conf.ssl_mode = SUDO_LDAP_SSL;
|
ldap_conf.ssl_mode = SUDO_LDAP_SSL;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(ldap_conf.host);
|
efree(ldap_conf.host);
|
||||||
ldap_conf.host = estrdup(hostbuf);
|
ldap_conf.host = estrdup(hostbuf);
|
||||||
efree(buf);
|
efree(buf);
|
||||||
} while ((uri_list = uri_list->next));
|
} while ((uri_list = uri_list->next));
|
||||||
|
Reference in New Issue
Block a user