[parted-devel] leaks and errors, oh-my!

Otavio Salvador otavio at debian.org
Fri May 30 22:52:12 UTC 2008


Jim Meyering <jim at meyering.net> writes:

> diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
> index 8bb9554..5be0235 100644
> --- a/libparted/labels/gpt.c
> +++ b/libparted/labels/gpt.c
> @@ -924,6 +924,7 @@ gpt_read (PedDisk * disk)
>  		ped_disk_commit_to_dev (disk);
>  #endif
>
> +        pth_free (gpt);
>  	return 1;
>
>  error_delete_all:
> -- 
> 1.5.6.rc0.30.g7c3f3

Bad indent.

> diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
> index 0d8357b..148eea3 100644
> --- a/libparted/labels/gpt.c
> +++ b/libparted/labels/gpt.c
> @@ -1033,7 +1033,7 @@ gpt_write(const PedDisk * disk)
>  	GPTDiskData* gpt_disk_data;
>  	GuidPartitionEntry_t* ptes;
>  	uint32_t ptes_crc;
> -        uint8_t* pth_raw = ped_malloc (pth_get_size (disk->dev));
> +        uint8_t* pth_raw;
>  	GuidPartitionTableHeader_t* gpt;
>  	PedPartition* part;
>  	int ptes_size;
> -- 
> 1.5.6.rc0.30.g7c3f3

I think you might fix this indenting (it looks that it was already
wrong before).

Please go ahead.

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."



More information about the parted-devel mailing list