Detail(): Remember to free 'avail'

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Jes Sorensen 2011-11-01 16:09:25 +01:00 committed by NeilBrown
parent 518a60f385
commit d067351703
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,7 @@ int Detail(char *dev, int brief, int export, int test, char *homehost)
int rv = test ? 4 : 1;
int avail_disks = 0;
char *avail;
char *avail = NULL;
if (fd < 0) {
fprintf(stderr, Name ": cannot open %s: %s\n",
@ -587,6 +587,7 @@ This is pretty boring
out:
close(fd);
free(subarray);
free(avail);
sysfs_free(sra);
return rv;
}