[common] ivshmem: fix possible resource leak

This commit is contained in:
Geoffrey McRae 2023-11-11 14:04:54 +11:00
parent a28deae569
commit ec88a52fe2

View File

@ -175,6 +175,7 @@ bool ivshmemOpenDev(struct IVSHMEM * dev, const char * shmDevice)
{ {
DEBUG_ERROR("Failed to map the shared memory device: %s", shmDevice); DEBUG_ERROR("Failed to map the shared memory device: %s", shmDevice);
DEBUG_ERROR("%s", strerror(errno)); DEBUG_ERROR("%s", strerror(errno));
close(devFd);
return false; return false;
} }