in do_browse_from(), during the operating directory check, if path isn't
NULL, don't bother freeing it before mallocstrcpy()ing operating_dir into it, as the latter operation will free it git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
+2
-5
@@ -415,11 +415,8 @@ char *do_browse_from(const char *inpath)
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
/* If the resulting path isn't in the operating directory, use
|
||||
* the operating directory instead. */
|
||||
if (check_operating_dir(path, FALSE)) {
|
||||
if (path != NULL)
|
||||
free(path);
|
||||
path = mallocstrcpy(NULL, operating_dir);
|
||||
}
|
||||
if (check_operating_dir(path, FALSE))
|
||||
path = mallocstrcpy(path, operating_dir);
|
||||
#endif
|
||||
|
||||
if (path != NULL)
|
||||
|
||||
Reference in New Issue
Block a user