Close the file descriptor (freeing the file structure) when opening a
file fails.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
__com32.cs_intcall(0x22, ®s, ®s);
if ((regs.eflags.l & EFLAGS_CF) || regs.esi.w[0] == 0) {
+ close(fd);
errno = ENOENT;
return -1;
}
{
uint16_t blklg2;
-asm("bsrw %1,%0": "=r"(blklg2):"rm"(regs.ecx.w[0]));
+ asm("bsrw %1,%0" : "=r" (blklg2) : "rm" (regs.ecx.w[0]));
fp->i.blocklg2 = blklg2;
}
fp->i.length = regs.eax.l;