Hi,

Here a little diff to fix small memory leaks inside installboot. Hope it
finds its way.

Kind regards.
Index: i386_installboot.c
===================================================================
RCS file: /cvs/src/usr.sbin/installboot/i386_installboot.c,v
retrieving revision 1.26
diff -u -p -r1.26 i386_installboot.c
--- i386_installboot.c  28 Dec 2015 23:00:29 -0000      1.26
+++ i386_installboot.c  24 Mar 2016 17:15:53 -0000
@@ -794,6 +794,8 @@ getbootparams(char *boot, int devfd, str
                    (unsigned int)((((char *)ap) - buf) + INODEOFF));
        }
 
+       free(buf);
+
        return 0;
 }
 
Index: i386_softraid.c
===================================================================
RCS file: /cvs/src/usr.sbin/installboot/i386_softraid.c,v
retrieving revision 1.9
diff -u -p -r1.9 i386_softraid.c
--- i386_softraid.c     1 Dec 2015 06:39:52 -0000       1.9
+++ i386_softraid.c     24 Mar 2016 17:15:53 -0000
@@ -194,5 +194,7 @@ sr_install_bootldr(int devfd, char *dev)
                fprintf(stderr, "%s is %d blocks x %d bytes\n",
                    stage2, nblocks, bsize);
 
+       free(p);
+
        close(fd);
 }

Reply via email to