mirror of
https://github.com/jarun/nnn.git
synced 2025-03-18 20:39:45 +00:00
Fix memory leak
This commit is contained in:
parent
eae60c3048
commit
e7f73d95ce
1 changed files with 2 additions and 0 deletions
|
@ -4332,9 +4332,11 @@ static bool handle_archive(char *fpath /* in-out param */, char op)
|
||||||
if (x_to) {
|
if (x_to) {
|
||||||
if (chdir(xdirname(fpath)) == -1) {
|
if (chdir(xdirname(fpath)) == -1) {
|
||||||
printwarn(NULL);
|
printwarn(NULL);
|
||||||
|
free(outdir);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
xstrsncpy(fpath, outdir, PATH_MAX);
|
xstrsncpy(fpath, outdir, PATH_MAX);
|
||||||
|
free(outdir);
|
||||||
} else if (op == 'x')
|
} else if (op == 'x')
|
||||||
fpath[0] = '\0';
|
fpath[0] = '\0';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue