I found this (well, valgrind did..) when debugging #1251. I haven't found any TDB specific free function, so I just used free..
On Thu, Mar 15, 2012 at 08:24:40PM +0100, Jakub Hrozek wrote:
I found this (well, valgrind did..) when debugging #1251. I haven't found any TDB specific free function, so I just used free..
From d2f9f81b334e6685c050f8b3e13a3a1266858a07 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek jhrozek@redhat.com Date: Wed, 14 Mar 2012 16:22:50 +0100 Subject: [PATCH] Free entry found in negative cache
src/responder/common/negcache.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c index fab549c16d911985fbc37f112499e9f692103334..02a4d18023e5345363e5be997d78e2eebc5ba1a0 100644 --- a/src/responder/common/negcache.c +++ b/src/responder/common/negcache.c @@ -127,6 +127,7 @@ done: ret = ENOENT; }
- free(data.dptr);
using free() is safe here, but you have to initialize data, or at least data.dptr at the beginning of sss_ncache_check_str() because there is a goto done before data is set.
bye, Sumit
return ret;
}
-- 1.7.7.6
sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel
On Thu, Mar 15, 2012 at 10:57:04PM +0100, Sumit Bose wrote:
using free() is safe here, but you have to initialize data, or at least data.dptr at the beginning of sss_ncache_check_str() because there is a goto done before data is set.
bye, Sumit
Ah, thank you. New patch is attached.
On Fri, Mar 16, 2012 at 09:08:48AM +0100, Jakub Hrozek wrote:
On Thu, Mar 15, 2012 at 10:57:04PM +0100, Sumit Bose wrote:
using free() is safe here, but you have to initialize data, or at least data.dptr at the beginning of sss_ncache_check_str() because there is a goto done before data is set.
bye, Sumit
Ah, thank you. New patch is attached.
Sorry, that was wrong, yet another patch attached.
On Fri, Mar 16, 2012 at 01:15:51PM +0100, Jakub Hrozek wrote:
On Fri, Mar 16, 2012 at 09:08:48AM +0100, Jakub Hrozek wrote:
On Thu, Mar 15, 2012 at 10:57:04PM +0100, Sumit Bose wrote:
using free() is safe here, but you have to initialize data, or at least data.dptr at the beginning of sss_ncache_check_str() because there is a goto done before data is set.
bye, Sumit
Ah, thank you. New patch is attached.
Sorry, that was wrong, yet another patch attached.
ACK
bye, Sumit
On Fri, 2012-03-16 at 17:24 +0100, Sumit Bose wrote:
On Fri, Mar 16, 2012 at 01:15:51PM +0100, Jakub Hrozek wrote:
On Fri, Mar 16, 2012 at 09:08:48AM +0100, Jakub Hrozek wrote:
On Thu, Mar 15, 2012 at 10:57:04PM +0100, Sumit Bose wrote:
using free() is safe here, but you have to initialize data, or at least data.dptr at the beginning of sss_ncache_check_str() because there is a goto done before data is set.
bye, Sumit
Ah, thank you. New patch is attached.
Sorry, that was wrong, yet another patch attached.
ACK
Pushed to master and sssd-18.
sssd-devel@lists.fedorahosted.org