diff options
author | Gunter Knauf <gk@gknw.de> | 2007-08-15 08:18:37 +0000 |
---|---|---|
committer | Gunter Knauf <gk@gknw.de> | 2007-08-15 08:18:37 +0000 |
commit | e5d8693865b44ecfbafbe15a7850d6e8dbb051e9 (patch) | |
tree | 57046e38279b10597b11288494102a88f980d537 | |
parent | 46c92c0b806da041d7a5c6fb64dbcdc474d99b31 (diff) |
added ldap_msgfree() to fix memory leak.
-rw-r--r-- | lib/ldap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ldap.c b/lib/ldap.c index ab73a0f4b..3c7584a6a 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -126,7 +126,7 @@ CURLcode Curl_ldap(struct connectdata *conn, bool *done) int rc = 0; LDAP *server; LDAPURLDesc *ludp = NULL; - LDAPMessage *result; + LDAPMessage *result = NULL; LDAPMessage *entryIterator; int num = 0; struct SessionHandle *data=conn->data; @@ -245,6 +245,8 @@ quit: LDAP_TRACE (("Received %d entries\n", num)); if (rc == LDAP_SIZELIMIT_EXCEEDED) infof(data, "There are more than %d entries\n", num); + if (result) + ldap_msgfree(result); if (ludp) ldap_free_urldesc(ludp); if (server) |