trace-cmd test: Close handle after opening
PATCH 1/1 trace-cmd test: Close handle after opening
From: "Steven Rostedt (Google)" <[email protected]>
The unit tests opens a handle via tracecmd_open() but fails to close it causing the memory leak detector to trigger on it.
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- utest/tracecmd-utest.c | 2 ++ 1 file changed, 2 insertions(+)
utest/tracecmd-utest.c +2 -0
@@ -438,6 +438,8 @@ static void test_trace_library_read(void) ret =tracecmd_iterate_events (handle,NULL ,0 , read_events, &data);CU_TEST (ret ==0 ); +tracecmd_close (handle); +CU_TEST (data.counter >0 );trace_seq_destroy (&data.seq); }
Signature · 1 line
2.35.1