summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorzinovik <zinovik@cvs.openbsd.org>2010-06-12 09:08:57 +0000
committerzinovik <zinovik@cvs.openbsd.org>2010-06-12 09:08:57 +0000
commitb0b9cce6b866f1f2540fda78f9c5c54573614fba (patch)
treea78dd348f5aa648af0daa9e5ffb6c6b641e584d9 /usr.sbin
parent941d266f7557909f1634b3e470409d84eb8d19cf (diff)
at line 445 `al' is allocated via `aldap_init' in `client_aldap_open'
function, but when further in code we might do `goto bad', `al' is not freed with `aldap_close', so plug memory leak on error path tested by jasper@ ok pyr@, jasper@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypldap/ldapclient.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c
index 66359ef49c9..8deceb23e9d 100644
--- a/usr.sbin/ypldap/ldapclient.c
+++ b/usr.sbin/ypldap/ldapclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldapclient.c,v 1.15 2010/04/01 18:24:04 zinovik Exp $ */
+/* $OpenBSD: ldapclient.c,v 1.16 2010/06/12 09:08:56 zinovik Exp $ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
@@ -660,6 +660,7 @@ next_grpentry:
return (0);
bad:
+ aldap_close(al);
log_debug("directory %s errored out in %s", idm->idm_name, where);
return (-1);
}