Fix: relayd viewer stream: unhandled out of memory error
A message that is not in the archive (sent off-list or not yet received): [email protected]
Merged all the way to 2.4, thanks!
Jérémie
Quoted 29 lines · Mathieu Desnoyers
Signed-off-by Mathieu Desnoyers <[email protected]>--- src/bin/lttng-relayd/viewer-stream.c | 8 ++++++++ 1 file changed, 8 insertions(+)src/bin/lttng-relayd/viewer-stream.c +8
-1@@ -58,8 +58,16 @@ struct relay_viewer_stream *viewer_stream_create(struct relay_stream *stream, vstream->session_id = stream->session_id; vstream->stream_handle = stream->stream_handle; vstream->path_name =strndup (stream->path_name,LTTNG_VIEWER_PATH_MAX ); +if (vstream->path_name ==NULL ) { +PERROR ("relay viewer path_name alloc" ); + goto error; + } vstream->channel_name =strndup (stream->channel_name,LTTNG_VIEWER_NAME_MAX ); +if (vstream->channel_name ==NULL ) { +PERROR ("relay viewer channel_name alloc" ); + goto error; + } vstream->tracefile_count = stream->tracefile_count; vstream->metadata_flag = stream->metadata_flag; vstream->tracefile_count_last =-1ULL ; --2.1.1
Signature · 8 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev