Hello, tech@

Following diff fixes memory and FILE handle leaks.  `acpidir' is allocated via
asprintf(3) and `ifp' is opened via popen(3), but not closed.

Index: sendbug.c
===================================================================
RCS file: /cvs/src/usr.bin/sendbug/sendbug.c,v
retrieving revision 1.63
diff -u -r1.63 sendbug.c
--- sendbug.c   26 Aug 2009 20:40:40 -0000      1.63
+++ sendbug.c   21 Mar 2010 11:39:36 -0000
@@ -600,7 +600,9 @@
                }
                pclose(ofp);
        }
+       pclose(ifp);
        free(cmd);
+       free(acpidir);
 }
void

Reply via email to