andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
Blob Blame History Raw
From 87ea991e13529278c8c4097322af17870220ff85 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 18 Mar 2014 16:08:19 -0400
Subject: [PATCH 189/225] Ticket 47743 - Memory leak with proxy auth control

Description:  We were not properly freeing the ber when parsing
              the proxy auth DN.

https://fedorahosted.org/389/ticket/47743

Reviewed by: rmeggins(Thanks!)
(cherry picked from commit e4a1de6abf9cf349f89c7b55527e89da258c5fd5)
(cherry picked from commit 872b7d906d4d1d2f03f34841beb005a8b222ff03)
---
 ldap/servers/slapd/proxyauth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldap/servers/slapd/proxyauth.c b/ldap/servers/slapd/proxyauth.c
index 17b6a05..25c9807 100644
--- a/ldap/servers/slapd/proxyauth.c
+++ b/ldap/servers/slapd/proxyauth.c
@@ -154,7 +154,7 @@ parse_LDAPProxyAuth(struct berval *spec_ber, int version, char **errtextp,
   END
 
   /* Cleanup */
-  if (ber) ber_free(ber, 0);
+  if (ber) ber_free(ber, 1);
 
   if ( LDAP_SUCCESS != lderr)
   {
-- 
1.8.1.4