* vfs.c (mc_chdir): Fixed memory leak.

This commit is contained in:
Roland Illig 2004-08-26 00:17:36 +00:00
parent 6f68fa3082
commit c64cec997a
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-08-26 Roland Illig <roland.illig@gmx.de>
* vfs.c (mc_chdir): Fixed memory leak.
2004-08-22 Leonard den Ottolander <leonard * den ottolander nl>
* vfs/extfs/a.in: Quote parameters to calls to system/open that spawn

View File

@ -678,8 +678,10 @@ mc_chdir (const char *path)
new_dir = vfs_canon (path);
new_vfs = vfs_get_class (new_dir);
if (!new_vfs->chdir)
if (!new_vfs->chdir) {
g_free (new_dir);
return -1;
}
result = (*new_vfs->chdir) (new_vfs, new_dir);