mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
mmap could fail, handle gracefully
This commit is contained in:
parent
f19d437564
commit
4abf1aa398
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue