in do_browse_from(), don't bother freeing path if it's NULL
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3777 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
b08c9f004c
commit
b8592ce2bb
|
@ -38,6 +38,7 @@ CVS code -
|
||||||
- During the operating directory check, if path isn't NULL,
|
- During the operating directory check, if path isn't NULL,
|
||||||
don't bother freeing it before mallocstrcpy()ing operating_dir
|
don't bother freeing it before mallocstrcpy()ing operating_dir
|
||||||
into it, as the latter operation will free it. (DLR)
|
into it, as the latter operation will free it. (DLR)
|
||||||
|
- Don't bother freeing path if it's NULL. (DLR)
|
||||||
browser_init()
|
browser_init()
|
||||||
- Fix off-by-one error when calculating longest that kept the
|
- Fix off-by-one error when calculating longest that kept the
|
||||||
rightmost column of the screen from being used. (DLR)
|
rightmost column of the screen from being used. (DLR)
|
||||||
|
|
|
@ -426,7 +426,8 @@ char *do_browse_from(const char *inpath)
|
||||||
|
|
||||||
/* If we can't open the path, get out. */
|
/* If we can't open the path, get out. */
|
||||||
if (dir == NULL) {
|
if (dir == NULL) {
|
||||||
free(path);
|
if (path != NULL)
|
||||||
|
free(path);
|
||||||
beep();
|
beep();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue