Commit 8cc6da6
committed
in_forward: fix segfault and double-free in trace path handling
- Incomplete error check: only checked ret == -1, but ctr_decode_msgpack_create()
can return other error codes. When ctr is NULL on error, this caused NULL
pointer dereference.
- Double-free: called ctr_decode_msgpack_destroy() after successful
flb_input_trace_append(), but that function takes ownership and destroys
the context internally.
Signed-off-by: Eduardo Silva <[email protected]>1 parent f2dd991 commit 8cc6da6
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | | - | |
1150 | | - | |
| 1149 | + | |
| 1150 | + | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| |||
1159 | 1159 | | |
1160 | 1160 | | |
1161 | 1161 | | |
1162 | | - | |
| 1162 | + | |
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
| |||
0 commit comments