]> git.mdlowis.com Git - archive/afm.git/commitdiff
plugin leaks
authora bellenir <a@bellenir.com>
Sat, 26 Jul 2014 02:39:12 +0000 (02:39 +0000)
committera bellenir <a@bellenir.com>
Sat, 26 Jul 2014 02:39:12 +0000 (02:39 +0000)
source/workdir.c

index 3ae88e0adc80638d18575848c5d0a02feb87bb7c..c8b83b7e922ddeaa8ecf914aa48a816b16b1adc1 100644 (file)
@@ -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