From: a bellenir Date: Sat, 26 Jul 2014 02:39:12 +0000 (+0000) Subject: plugin leaks X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=1d91086dc67f21e2bbc2896d5d0120c9625bc783;p=archive%2Fafm.git plugin leaks --- 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