MFC r298868, r298874:

restore: fix memory and resource handle leaks.

CID:		272297, 1007784
This commit is contained in:
Pedro F. Giffuni 2016-05-06 01:37:06 +00:00
parent 2c1084bf36
commit 114d393b53
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=299148
2 changed files with 3 additions and 1 deletions

View File

@ -366,7 +366,8 @@ obsolete(int *argcp, char **argvp[])
if (flags) {
*p = '\0';
*nargv++ = flagsp;
}
} else
free(flagsp);
/* Copy remaining arguments. */
while ((*nargv++ = *argv++));

View File

@ -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':
/*