From: Gabriel-Andrew Pollo-Guilbert Date: Mon, 29 Jul 2019 15:14:26 +0000 (-0400) Subject: Fix: remove uninitialised value X-Git-Tag: v2.9.6~3 X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=commitdiff_plain;h=acafe8d878bdbfd391b47b5b8a525a82a6e9702b Fix: remove uninitialised value Commit 973eac638e4fd introduces an uninitialised value that may prevent shared memory from being allocated. The compiler didn't give any warning because the pointer to the value is sent to a function that don't do anything with it. We simply pass NULL to that function. Signed-off-by: Gabriel-Andrew Pollo-Guilbert Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 9a40f958..fba23686 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -857,17 +857,14 @@ int handle_message(struct sock_info *sock_info, } case LTTNG_UST_STREAM: { - uint64_t memory_map_size; - /* Receive shm_fd, wakeup_fd */ ret = ustcomm_recv_stream_from_sessiond(sock, - &memory_map_size, + NULL, &args.stream.shm_fd, &args.stream.wakeup_fd); if (ret) { goto error; } - lum->u.stream.len = memory_map_size; if (ops->cmd) ret = ops->cmd(lum->handle, lum->cmd,