vfs_streams_xattr: initialize pointer
authorRalph Boehme <slow@samba.org>
Fri, 21 Nov 2014 13:54:17 +0000 (14:54 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 21 Nov 2014 21:47:05 +0000 (22:47 +0100)
Intitialize pointer to NULL, otherwise we talloc_free() an unitialized
pointer in the error code path.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_streams_xattr.c

index 631444251525fab363970a6baa92ce42a287d302..f65ccc87ed81dab9ca480f85e27b5cc92e4987b8 100644 (file)
@@ -533,7 +533,7 @@ static int streams_xattr_unlink(vfs_handle_struct *handle,
 {
        NTSTATUS status;
        int ret = -1;
-       char *xattr_name;
+       char *xattr_name = NULL;
 
        if (!is_ntfs_stream_smb_fname(smb_fname)) {
                return SMB_VFS_NEXT_UNLINK(handle, smb_fname);