cmplog_shm shmat was missing result check

This commit is contained in:
van Hauser
2020-02-28 00:41:56 +01:00
parent f526bb2ecb
commit 41493b1e3f
2 changed files with 6 additions and 2 deletions

View File

@ -191,7 +191,8 @@ void setup_shm(unsigned char dumb_mode) {
if (cmplog_mode) cmp_map = shmat(cmplog_shm_id, NULL, 0);
if (!trace_bits) PFATAL("shmat() failed");
if (trace_bits == -1 || !trace_bits || cmp_map == -1 || !cmp_map)
PFATAL("shmat() failed");
#endif