From 1d91086dc67f21e2bbc2896d5d0120c9625bc783 Mon Sep 17 00:00:00 2001 From: a bellenir Date: Sat, 26 Jul 2014 02:39:12 +0000 Subject: [PATCH] plugin leaks --- source/workdir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/workdir.c b/source/workdir.c index 3ae88e0..c8b83b7 100644 --- a/source/workdir.c +++ b/source/workdir.c @@ -130,9 +130,8 @@ void workdir_ls(WorkDir_T* wd){ filename[read-1]=0; //remove ending newline strcpy(lol, filename); vec_push_back(wd->vfiles, lol); - free(filename); - filename = 0; } + free(filename); pclose(ls); //mem_release(dotdot); #dont free, because there's a bug(?) in vectors and reference counting //reference counter is not incremented for added items, so releasinghere will free the memory -- 2.52.0