svn commit: r299148 - stable/10/sbin/restore
Pedro F. Giffuni
pfg at FreeBSD.org
Fri May 6 01:37:07 UTC 2016
Author: pfg
Date: Fri May 6 01:37:06 2016
New Revision: 299148
URL: https://svnweb.freebsd.org/changeset/base/299148
Log:
MFC r298868, r298874:
restore: fix memory and resource handle leaks.
CID: 272297, 1007784
Modified:
stable/10/sbin/restore/main.c
stable/10/sbin/restore/symtab.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sbin/restore/main.c
==============================================================================
--- stable/10/sbin/restore/main.c Fri May 6 01:27:01 2016 (r299147)
+++ stable/10/sbin/restore/main.c Fri May 6 01:37:06 2016 (r299148)
@@ -366,7 +366,8 @@ obsolete(int *argcp, char **argvp[])
if (flags) {
*p = '\0';
*nargv++ = flagsp;
- }
+ } else
+ free(flagsp);
/* Copy remaining arguments. */
while ((*nargv++ = *argv++));
Modified: stable/10/sbin/restore/symtab.c
==============================================================================
--- stable/10/sbin/restore/symtab.c Fri May 6 01:27:01 2016 (r299147)
+++ stable/10/sbin/restore/symtab.c Fri May 6 01:37:06 2016 (r299148)
@@ -560,6 +560,7 @@ initsymtable(char *filename)
fprintf(stderr, "read: %s\n", strerror(errno));
panic("cannot read symbol table file %s\n", filename);
}
+ (void)close(fd);
switch (command) {
case 'r':
/*
More information about the svn-src-stable-10
mailing list