unlink the extra tmp file generated
authorweiyu <weiyuluo1232@gmail.com>
Thu, 1 Aug 2019 23:43:06 +0000 (16:43 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Thu, 1 Aug 2019 23:43:06 +0000 (16:43 -0700)
snapshot.cc

index 24e8d07..d287319 100644 (file)
@@ -402,8 +402,13 @@ static void fork_loop() {
                                }
                        }
 
-                       if (fork_snap->mIDToRollback != snapshotid)
+                       if (fork_snap->mIDToRollback != snapshotid) {
+                               char filename[256];
+                               snprintf_(filename, sizeof(filename), "C11FuzzerTmp%d", forkedID);
+                               unlink(filename);
+
                                _Exit(EXIT_SUCCESS);
+                       }
                }
        }
 }