diff --git a/lib/vfs/mc-vfs/vfs.c b/lib/vfs/mc-vfs/vfs.c index 3f9226969..24e8410c4 100644 --- a/lib/vfs/mc-vfs/vfs.c +++ b/lib/vfs/mc-vfs/vfs.c @@ -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;