Re: [PATCH] btrfs-progs: fix bug on mkfs with relative path specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 11, 2014 at 06:24:27PM +0800, Gui Hecheng wrote:
> @@ -764,7 +765,7 @@ static int traverse_directory(struct btrfs_trans_handle *trans,
>  	/* Add list for source directory */
>  	dir_entry = malloc(sizeof(struct directory_name_entry));
>  	dir_entry->dir_name = dir_name;
> -	dir_entry->path = strdup(dir_name);
> +	dir_entry->path = realpath(dir_name, real_path);

The fix is ok, but the return value of realpath() has to be checked.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux