1
0
mirror of https://github.com/PDP-10/klh10.git synced 2026-02-08 09:11:59 +00:00

Add missing fclose after tape format detection.

Without this, doing something like:
  devmount mta0 /tmp/foo
  devunmount mta0
(i.e. without specifying fmt=bar to the devmount) will leak a FILE * and
file descriptor.
This commit is contained in:
Adam Sampson
2018-05-12 12:35:34 +01:00
parent 678db7c80b
commit 591437d302

View File

@@ -886,6 +886,8 @@ vmt_rdmount(register struct vmtape *t,
return FALSE;
}
dfn = ta->vmta_path;
fclose(df);
df = NULL;
}
havefmt:
if (vmtfmttab[fmt].tf_flags & (VMTFF_CTL | VMTFF_XCTL)) {