]> PatchyGit - patchyircd.git/commitdiff
fix double-free with jobs
authorEgor <egor@patchysicp.xyz>
Fri, 28 Jun 2024 18:26:27 +0000 (21:26 +0300)
committerEgor <egor@patchysicp.xyz>
Fri, 28 Jun 2024 18:26:27 +0000 (21:26 +0300)
src/job.c

index e0e5103..ea043c1 100644 (file)
--- a/src/job.c
+++ b/src/job.c
@@ -62,6 +62,7 @@ static void job_process(void)
                        current_child = pid;
                        memset(jobtab[0].data, 0, jobtab[0].len);
                        free(jobtab[0].data);
+                       jobtab[0].data = 0;
                        jobtab[0].job = 0;
                }
        }