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 24e8d073ca1330eb778b897955e500dab30f9c5e..d287319a5f0bda5f18438b2e8354e60ab755e4da 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);
+                       }
                }
        }
 }