From: Hallvard Furuseth Date: Mon, 23 Nov 1998 01:44:24 +0000 (+0000) Subject: Plug memory leak X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~1041 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=185586f5c236a896caef274ab3b4ba8d5dccc194;p=openldap Plug memory leak --- diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c index 3801899ceb..527f4e876b 100644 --- a/libraries/libldap/init.c +++ b/libraries/libldap/init.c @@ -165,6 +165,7 @@ static void openldap_ldap_init_w_conf(const char *file) static void openldap_ldap_init_w_userconf(const char *file) { + if (file[file[0] == '.'] != '/') { char *home = getenv("HOME"); char *path; @@ -184,6 +185,8 @@ static void openldap_ldap_init_w_userconf(const char *file) sprintf(path, "%s/.%s", home, file); openldap_ldap_init_w_conf(path); } + free(path); + } /* try file */ openldap_ldap_init_w_conf(file);