diff --git a/experimental/c-cpp/runner.py b/experimental/c-cpp/runner.py index e27198c93c..d2e3268bef 100644 --- a/experimental/c-cpp/runner.py +++ b/experimental/c-cpp/runner.py @@ -251,6 +251,15 @@ def run_on_targets(target, build_heuristics=build_heuristics, generator_heuristics=generator_heuristics) + # Cleanup the OSS-Fuzz docker image + clean_up_cmd = [ + 'docker', 'image', 'rm', f'gcr.io/oss-fuzz/{worker_project_name}' + ] + try: + subprocess.check_call(' '.join(clean_up_cmd), shell=True) + except subprocess.CalledProcessError: + pass + if semaphore is not None: semaphore.release()