On Fri, Apr 20, 2012 at 07:36:45PM +0200, Jim Meyering wrote:
> From: Jim Meyering <meyer...@redhat.com>
> 
> * mkfs.c (traverse_directory): No semantic change.
> ---
>  mkfs.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/mkfs.c b/mkfs.c
> index c531ef2..03239fb 100644
> --- a/mkfs.c
> +++ b/mkfs.c
> @@ -911,8 +911,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 = malloc(strlen(dir_name) + 1);
> -     strcpy(dir_entry->path, dir_name);
> +     dir_entry->path = strdup(dir_name);
> 
>       parent_inum = highest_inum + BTRFS_FIRST_FREE_OBJECTID;
>       dir_entry->inum = parent_inum;
> -- 
> 1.7.10.208.gb4267
> 

Reviewed-by: Josef Bacik <jo...@redhat.com>

Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to