s3: Do not free a string where we should not
authorVolker Lendecke <vl@samba.org>
Sun, 25 Nov 2012 14:19:32 +0000 (14:19 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 26 Nov 2012 19:14:15 +0000 (11:14 -0800)
Reviewed by: Jeremy Allison <jra@samba.org>

source3/winbindd/winbindd_cache.c

index 517a3028ff8b1e44a5e5a80d48f3be4b2db366c5..af4684950acf0b51f07a8d0cc4ca2fdfa07ed8df 100644 (file)
@@ -1114,7 +1114,7 @@ NTSTATUS resolve_username_to_alias( TALLOC_CTX *mem_ctx,
        if ( (upper_name = SMB_STRDUP(name)) == NULL )
                return NT_STATUS_NO_MEMORY;
        if (!strupper_m(upper_name)) {
-               SAFE_FREE(name);
+               SAFE_FREE(upper_name);
                return NT_STATUS_INVALID_PARAMETER;
        }