s3:winbind: Fix Coverity ID 942: Resource Leak
authorVolker Lendecke <vl@samba.org>
Wed, 26 Aug 2009 16:20:06 +0000 (18:20 +0200)
committerVolker Lendecke <vl@samba.org>
Wed, 26 Aug 2009 16:20:06 +0000 (18:20 +0200)
source3/winbindd/winbindd_cache.c

index a46aa0af3ebbabe8f450ef2ae5b39df9a9d706d1..c947254e81a4ccca0eb8b8bed62e4a9ba44031e9 100644 (file)
@@ -2306,6 +2306,7 @@ NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
 
        *num_names = centry_uint32(centry);
        if (*num_names == 0) {
+               centry_free(centry);
                return NT_STATUS_OK;
        }
 
@@ -2317,6 +2318,7 @@ NTSTATUS wcache_lookup_groupmem(struct winbindd_domain *domain,
                TALLOC_FREE(*sid_mem);
                TALLOC_FREE(*names);
                TALLOC_FREE(*name_types);
+               centry_free(centry);
                return NT_STATUS_NO_MEMORY;
        }