From bbc70d1b2a7a366a17283194af813c239d9dd8c7 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 5 Nov 2011 14:56:56 -0400 Subject: [PATCH] Zero out callback pointers in consumer process They cannot be used anyway. Signed-off-by: Mathieu Desnoyers --- liblttng-ust-ctl/ustctl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 2d915260..cd80faec 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -449,6 +449,12 @@ struct lttng_ust_shm_handle *ustctl_map_channel(struct lttng_ust_object_data *ch return NULL; } memcpy(handle->shadow_chan, chan, chan_size); + /* + * The callback pointers in the producer are invalid in the + * consumer. Zero them out. + */ + memset(&handle->shadow_chan->backend.config.cb, 0, + sizeof(handle->shadow_chan->backend.config.cb)); return handle; } -- 2.34.1