Avoid resource leak in case we bail loop early
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
char *devname = tmpdev->devname;
int dfd;
struct stat stb;
- struct supertype *tst = dup_super(st);
+ struct supertype *tst;
struct dev_policy *pol = NULL;
int found_container = 0;
continue;
}
+ tst = dup_super(st);
+
dfd = dev_open(devname, O_RDONLY|O_EXCL);
if (dfd < 0) {
if (report_missmatch)