From 07a7f446b05afe1c6bf0dd613e6734b3ea2aa5ce Mon Sep 17 00:00:00 2001 From: Vit Rosin Date: Wed, 17 Mar 2010 09:07:46 +0000 Subject: [PATCH] Ticket #2108: Fixed memory leak in fish_linear_start() function. Signed-off-by: Andrew Borodin --- lib/vfs/mc-vfs/fish.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vfs/mc-vfs/fish.c b/lib/vfs/mc-vfs/fish.c index 317ece262..1f20c95df 100644 --- a/lib/vfs/mc-vfs/fish.c +++ b/lib/vfs/mc-vfs/fish.c @@ -819,9 +819,10 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset) if (offset) ERRNOR (E_NOTSUPP, 0); name = vfs_s_fullpath (me, fh->ino); - if (!name) + if (name == NULL) return 0; - quoted_name = strutils_shell_escape(name); + quoted_name = strutils_shell_escape (name); + g_free (name); fh->u.fish.append = 0; /*