From: Mathieu Desnoyers Date: Sat, 5 Nov 2011 18:56:56 +0000 (-0400) Subject: Zero out callback pointers in consumer process X-Git-Tag: v1.9.1~128 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bbc70d1b2a7a366a17283194af813c239d9dd8c7;p=lttng-ust.git Zero out callback pointers in consumer process They cannot be used anyway. Signed-off-by: Mathieu Desnoyers --- 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; }