]> granicus.if.org Git - sudo/commitdiff
Plug a memory leak in sudo_edit.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 28 Jan 2016 17:54:34 +0000 (10:54 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 28 Jan 2016 17:54:34 +0000 (10:54 -0700)
src/sudo_edit.c

index eddff3f6a4b3f2bba028ed74b039ecf75209d3be..e8da7e11b33a7e7bbbfe5550019ce60dc1183392 100644 (file)
@@ -990,6 +990,8 @@ sudo_edit(struct command_details *command_details)
 #endif
        errors = sudo_edit_copy_tfiles(command_details, tf, nfiles, times);
 
+    for (i = 0; i < nfiles; i++)
+       free(tf[i].tfile);
     free(tf);
     free(nargv);
     debug_return_int(errors ? 1 : rval);