Ticket #2053: fixed memory leak in mc_symlink() function.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Vit Rosin 2010-02-23 12:16:39 +03:00 committed by Andrew Borodin
parent e2b2ea2bfa
commit 3770047407
1 changed files with 2 additions and 1 deletions

View File

@ -617,7 +617,8 @@ mc_symlink (const char *name1, const char *path)
vfs = vfs_get_class (mpath);
result = vfs->symlink ? (*vfs->symlink) (vfs, lpath, mpath) : -1;
g_free (lpath);
g_free (mpath);
if (result == -1)
errno = vfs->symlink ? ferrno (vfs) : E_NOTSUPP;
return result;