diff options
author | Anthony Youngman <anthony@youngman.org.uk> | 2018-06-16 21:48:46 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-07-11 19:08:25 +0200 |
commit | 29446c962f6099b9f0c22b76891ff6a0baeb673d (patch) | |
tree | 0a76c515db7ccf0de275959e2beb8a00046f529e /Dump.c | |
parent | Coverity: Resource leak: fix return without free (diff) | |
download | mdadm-29446c962f6099b9f0c22b76891ff6a0baeb673d.tar.xz mdadm-29446c962f6099b9f0c22b76891ff6a0baeb673d.zip |
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>
Diffstat (limited to 'Dump.c')
-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: |