about summary refs log tree commit diff
diff options
context:
space:
mode:
authorche30122 <43172568+che30122@users.noreply.github.com>2022-04-28 15:42:49 +0800
committerGitHub <noreply@github.com>2022-04-28 09:42:49 +0200
commit01594dc416c154a7eb8d6782e9a25a8713ad3709 (patch)
tree0003470c83040b95636362e80ea8119a5306e591
parentee409d18a6678c3f5948f51db8964148cae021dc (diff)
downloadafl++-01594dc416c154a7eb8d6782e9a25a8713ad3709.tar.gz
Properly null CmpLog map in deinit (#1395)
Co-authored-by: van Hauser <vh@thc.org>
-rw-r--r--include/debug.h2
-rw-r--r--src/afl-sharedmem.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/debug.h b/include/debug.h
index e2ee16a8..c2f20f0f 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -388,6 +388,8 @@ static inline const char *colorfilter(const char *x) {
                                                                               \
     } while (1);                                                              \
                                                                               \
+                                                                              \
+                                                                              \
   } while (0)
 
 #define ck_read(fd, buf, len, fn)                              \
diff --git a/src/afl-sharedmem.c b/src/afl-sharedmem.c
index 8d58bb3e..63575318 100644
--- a/src/afl-sharedmem.c
+++ b/src/afl-sharedmem.c
@@ -107,7 +107,7 @@ void afl_shm_deinit(sharedmem_t *shm) {
     if (shm->cmp_map != NULL) {
 
       munmap(shm->cmp_map, shm->map_size);
-      shm->map = NULL;
+      shm->cmp_map = NULL;
 
     }