Message ID | 20220316112512.55e5b486@gandalf.local.home (mailing list archive) |
---|---|
State | Accepted |
Commit | 37dd19f24c693e0c40a8cf133642e387b216540e |
Headers | show |
Series | kernelshark: Release input_mutex on not finding record | expand |
diff --git a/src/libkshark-tepdata.c b/src/libkshark-tepdata.c index e9244b0761bb..08aca0989a59 100644 --- a/src/libkshark-tepdata.c +++ b/src/libkshark-tepdata.c @@ -793,8 +793,10 @@ static char *tepdata_get_latency(struct kshark_data_stream *stream, record = tracecmd_read_at(kshark_get_tep_input(stream), entry->offset, NULL); - if (!record) + if (!record) { + pthread_mutex_unlock(&stream->input_mutex); return NULL; + } trace_seq_reset(&seq); tep_print_event(kshark_get_tep(stream), &seq, record,