diff --git a/code/client/libmumblelink.c b/code/client/libmumblelink.c index e4d70c5e..a18c6e8e 100644 --- a/code/client/libmumblelink.c +++ b/code/client/libmumblelink.c @@ -106,6 +106,8 @@ int mumble_link(const char* name) lm = (LinkedMem *) (mmap(NULL, sizeof(LinkedMem), PROT_READ | PROT_WRITE, MAP_SHARED, shmfd,0)); if (lm == (void *) (-1)) { lm = NULL; + close(shmfd); + return -1; } close(shmfd); #endif