Commit 3c5686d7 authored by Yonghong Song's avatar Yonghong Song

fix a memory leak for getline()

The memory allocated by getline() is not freed.
This may cause some tool like clang memory
leak sanitizer complain.
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
parent 8587ee00
...@@ -1014,6 +1014,7 @@ static int bpf_detach_probe(const char *ev_name, const char *event_type) ...@@ -1014,6 +1014,7 @@ static int bpf_detach_probe(const char *ev_name, const char *event_type)
found_event = 1; found_event = 1;
break; break;
} }
free(cptr);
fclose(fp); fclose(fp);
fp = NULL; fp = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment