amoralej / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 years ago
Clone
Blob Blame History Raw
From 009e862b170b9a9037852952640558c03ecda481 Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Thu, 1 Sep 2016 11:34:53 -0700
Subject: [PATCH 49/49] Ticket #48969 - nsslapd-auditfaillog always has an
 explicit path

Description: commit ef2c3c4cc6f966935dbe367dd0d882ae81de3cc4
introduced a RESOURCE_LEAK.
    auditlog.c:180: leaked_storage: Variable "audit_config" going
                    out of scope leaks the storage it points to.

Reviewed by nhosoi (one line commit rule)

(cherry picked from commit 95d820901e7264490bae02b8ca943d09a344d7ac)
(cherry picked from commit b0fc82233a5ea929c5fad835f9e825a8f0b97968)
(cherry picked from commit fc1310e352e124d66d58d0a3e86d45c5573cbfb2)
---
 ldap/servers/slapd/auditlog.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ldap/servers/slapd/auditlog.c b/ldap/servers/slapd/auditlog.c
index 85d136c..74d1b46 100644
--- a/ldap/servers/slapd/auditlog.c
+++ b/ldap/servers/slapd/auditlog.c
@@ -177,6 +177,7 @@ write_auditfail_log_entry( Slapi_PBlock *pb )
         write_audit_file(SLAPD_AUDITFAIL_LOG, operation_get_type(op), dn, change, flag, curtime, pbrc, SLAPD_AUDITFAIL_LOG);
     }
     slapi_ch_free_string(&auditfail_config);
+    slapi_ch_free_string(&audit_config);
 }
 
 
-- 
2.4.11