summaryrefslogtreecommitdiff
path: root/src/coredump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coredump.c')
-rw-r--r--src/coredump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/coredump.c b/src/coredump.c
index 7525f28..fc44740 100644
--- a/src/coredump.c
+++ b/src/coredump.c
@@ -188,12 +188,14 @@ static int move_core(char *fullpath, char *extension)
}
closedir(dir);
free(coreprefix);
+ coreprefix = NULL;
if (asprintf(&newpath, "%s%s.%s", processed_folder, corefilename, extension) == -1) {
ret = -1;
goto out;
}
free(corefilename);
+ corefilename = NULL;
rename(fullpath, newpath);
free(newpath);