mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
Merge branch '2053_vfs_memleak'
* 2053_vfs_memleak: Ticket #2053: fixed memory leak in mc_symlink() function.
This commit is contained in:
commit
26e167d249
@ -617,7 +617,8 @@ mc_symlink (const char *name1, const char *path)
|
|||||||
vfs = vfs_get_class (mpath);
|
vfs = vfs_get_class (mpath);
|
||||||
result = vfs->symlink ? (*vfs->symlink) (vfs, lpath, mpath) : -1;
|
result = vfs->symlink ? (*vfs->symlink) (vfs, lpath, mpath) : -1;
|
||||||
g_free (lpath);
|
g_free (lpath);
|
||||||
|
g_free (mpath);
|
||||||
|
|
||||||
if (result == -1)
|
if (result == -1)
|
||||||
errno = vfs->symlink ? ferrno (vfs) : E_NOTSUPP;
|
errno = vfs->symlink ? ferrno (vfs) : E_NOTSUPP;
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user