We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e88160c + 152ac7a commit 6676753Copy full SHA for 6676753
1 file changed
src/dropreason.c
@@ -30,8 +30,11 @@ static int parse_reason_enum()
30
f = fopen("/sys/kernel/debug/tracing/events/skb/kfree_skb/format",
31
"r");
32
33
- if (!f || !fsearch(f, "__print_symbolic"))
+ if (!f || !fsearch(f, "__print_symbolic")) {
34
+ if (f)
35
+ fclose(f);
36
return -1;
37
+ }
38
39
while (true) {
40
if (!fsearch(f, "{") ||
@@ -41,6 +44,8 @@ static int parse_reason_enum()
41
44
}
42
45
drop_reason_max = index;
43
46
drop_reason_inited = true;
47
+
48
49
return 0;
50
51
0 commit comments