bug-parted
[Top][All Lists]
Advanced

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

Re: segfault in parted.c, inconsistency in 1.6.6


From: Andrew Clausen
Subject: Re: segfault in parted.c, inconsistency in 1.6.6
Date: Thu, 16 Oct 2003 12:53:16 +1000
User-agent: Mutt/1.5.4i

On Wed, Oct 15, 2003 at 05:52:43AM +0200, Michael Schwendt wrote:
> However, the line that was moved in the do_mkpart() function in the
> parted.c file is found at a different place compared with the
> do_mkpartfs() function that follows. Which one is right?
> 
> In do_mkpart(), the call to ped_constraint_destroy(..) is done later
> than in do_mkpartfs(). 
> 
> I'm not familiar with the code, but with the several goto's it can
> happen that in do_mkpart() it is returned from the function without
> calling ped_constraint_destroy(..) compared with do_mkpartfs().

I disagree (convince me!)

> I think the only difference between the two mkpart function should be
> the file-system creation. So, why the difference with regard to
> ped_constraint_destroy(..)?

It's purely a pragmatic thing for error handling.  If the file system
creation fails, the partition should be removed.  So, to make the
"roll-back" cleaner, I put the constraint destruction afterwards.

Thanks,
Andrew





reply via email to

[Prev in Thread] Current Thread [Next in Thread]