[Top][All Lists]

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

Re: [Nano-devel] [PATCH] browser: repalce newpath by path and present_pa

From: Rishabh Dave
Subject: Re: [Nano-devel] [PATCH] browser: repalce newpath by path and present_path
Date: Tue, 12 Jul 2016 17:31:12 +0530

On Fri, Jul 8, 2016 at 1:01 AM, Benno Schulenberg
<address@hidden> wrote:
> But from a quick look:
> -               free(newpath);
> -               newpath = NULL;
> +               free(path);
> +               path = NULL;
> Are you sure you want to make path null?  Don't you want to
> restore it from present_path?  Have you tested this route
> through the code?  You know: --operatingdir, ^R ^T, try to
> go outside, ^L.

Well, I first re-wrote the patch to remain up to the latest commit.
And then on running the test, I couldn't find anything. Practically, I
don't know the difference it would make on restoring from present_path
but it seems better to do so. Control remains in the loop, so there
can be no change on screen and there are no memory leaks or double
free()s. Patch making following change is attached -

-               free(newpath);
-               newpath = NULL;
+               path = mallocstrcpy(path, present_path);

Attachment: remove-newpath-and-set-path-to-present_path.patch
Description: Text Data

reply via email to

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