Svante Signell, le Fri 13 Jan 2012 12:13:49 +0100, a écrit :
> On Fri, 2012-01-13 at 11:18 +0100, Samuel Thibault wrote:
> > Svante Signell, le Fri 13 Jan 2012 10:33:23 +0100, a écrit :
> 
> > Err, why not? mkdirhier does not need to return anything to the caller,
> > so it can allocate/free at will. Isn't it possible to simply use
> > src = strdup(path)?
> 
> The problem is that in the end of the routine the src pointer does not
> point to the originally allocated address, so it  has to be reset to the
> start before freeing.

Not a problem: make a copy of the pointer.

Samuel


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to