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 517a302..af46849 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;
        }