[quake3-commits] r1765 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 4 11:02:01 EST 2010
Author: ludwig
Date: 2010-01-04 11:02:01 -0500 (Mon, 04 Jan 2010)
New Revision: 1765
Modified:
trunk/code/client/libmumblelink.c
Log:
mmap could fail, handle gracefully
Modified: trunk/code/client/libmumblelink.c
===================================================================
--- trunk/code/client/libmumblelink.c 2010-01-04 14:12:18 UTC (rev 1764)
+++ trunk/code/client/libmumblelink.c 2010-01-04 16:02:01 UTC (rev 1765)
@@ -106,6 +106,8 @@
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
More information about the quake3-commits
mailing list