diff options
author | Anthony Youngman <anthony@youngman.org.uk> | 2018-06-16 20:48:46 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-07-11 13:08:25 -0400 |
commit | 29446c962f6099b9f0c22b76891ff6a0baeb673d (patch) | |
tree | 0a76c515db7ccf0de275959e2beb8a00046f529e | |
parent | 4a670aabdcf6b7870aaa0088574a62603bb22f31 (diff) | |
download | mdadm-29446c962f6099b9f0c22b76891ff6a0baeb673d.tar.gz |
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>
-rw-r--r-- | Dump.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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: |