Coverity: Resource leak: close fds and free array before return

Signed-off-by: Anthony Youngman <anthony@youngman.org.uk>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Anthony Youngman 2018-06-16 20:48:46 +01:00 committed by Jes Sorensen
parent 4a670aabdc
commit 29446c962f
1 changed files with 3 additions and 0 deletions

3
Dump.c
View File

@ -301,6 +301,9 @@ int Restore_metadata(char *dev, char *dir, struct context *c,
}
if (c->verbose >= 0)
printf("%s restored from %s.\n", dev, fname);
close(fl);
close(fd);
free(fname);
return 0;
err: