s3: Fix a tiny memleak in copy_unix_token
authorVolker Lendecke <vl@samba.org>
Sat, 28 May 2011 08:39:25 +0000 (10:39 +0200)
committerVolker Lendecke <vlendec@samba.org>
Sat, 28 May 2011 09:47:11 +0000 (11:47 +0200)
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 28 11:47:11 CEST 2011 on sn-devel-104

source3/locking/locking.c

index 3e511c487d4fad143b1b12802f5dadc241760d43..a4561f50d83c5f849512b685f039c644ad361bb4 100644 (file)
@@ -1496,6 +1496,7 @@ static struct security_unix_token *copy_unix_token(TALLOC_CTX *ctx, const struct
                cpy->groups = (gid_t *)talloc_memdup(
                        cpy, tok->groups, tok->ngroups * sizeof(gid_t));
                if (!cpy->groups) {
+                       TALLOC_FREE(cpy);
                        return NULL;
                }
        }