From 185586f5c236a896caef274ab3b4ba8d5dccc194 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 23 Nov 1998 01:44:24 +0000 Subject: [PATCH] Plug memory leak --- libraries/libldap/init.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5