s3: Fix Coverity ID 710818 Resource leak
authorVolker Lendecke <vl@samba.org>
Mon, 30 Jul 2012 12:45:25 +0000 (14:45 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 31 Jul 2012 09:40:23 +0000 (11:40 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/msdfs.c

index 97775d6a9da739b7467a8579d5abdbff4cd448a8..b6ebaca1a11e0193a1b3a84e873d1650756db223 100644 (file)
@@ -841,6 +841,7 @@ static NTSTATUS self_ref(TALLOC_CTX *ctx,
 
        ref->alternate_path = talloc_strdup(ctx, dfs_path);
        if (!ref->alternate_path) {
+               TALLOC_FREE(ref);
                return NT_STATUS_NO_MEMORY;
        }
        ref->proximity = 0;