>From 176c54221346395dcdeed5a0b244c1f895cd36c9 Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Thu, 17 Dec 2009 14:12:16 -0800 Subject: [PATCH] Bug 548537 - Fix memory leaks in DNA plugin This fixes three small memory leaks in the DNA plugin. We were leaking the extended operation request data and response data for range requests as well as an attribute value for ADD operations when checking for the magic value. --- ldap/servers/plugins/dna/dna.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ldap/servers/plugins/dna/dna.c b/ldap/servers/plugins/dna/dna.c index 337cd23..4a99089 100644 --- a/ldap/servers/plugins/dna/dna.c +++ b/ldap/servers/plugins/dna/dna.c @@ -1614,6 +1614,8 @@ bail: slapi_ch_free_string(&lower_str); slapi_ch_free_string(&upper_str); ber_free(respber, 1); + ber_bvfree(request); + ber_bvfree(responsedata); if (ret != 0) { *upper = 0; @@ -2648,6 +2650,8 @@ static int dna_pre_op(Slapi_PBlock * pb, int modtype) || 0 == value) { generate = 1; } + + slapi_ch_free_string(&value); } else { /* check mods for magic value */ Slapi_Mod *next_mod = slapi_mod_new(); -- 1.6.2.5