projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
trace: fix potential use-after-free occurence
[project/procd.git]
/
trace
/
trace.c
diff --git
a/trace/trace.c
b/trace/trace.c
index 87a98a632b5e42eb041357dce417022239006282..40cf3df5b9adc031bd04a34e2beec401728fee00 100644
(file)
--- a/
trace/trace.c
+++ b/
trace/trace.c
@@
-166,8
+166,8
@@
static void print_syscalls(int policy, const char *json)
if (!tmp)
return;
- free(tmp);
fprintf(fp, "%s\n", tmp);
+ free(tmp);
fclose(fp);
ULOG_INFO("saving syscall trace to %s\n", json);
} else {