X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-metadata-client.h;h=3352e1f29649cd4154d6e81ed2fd61da60f64d16;hb=f680d83cec4c2f9c3caa6067f805a45c06f91657;hp=0d2a1f838e623ab8147221f23ed4e9ad3a487720;hpb=2bd73a3d2ed304b036f78822aab112e6ea5bbe2b;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-metadata-client.h b/liblttng-ust/lttng-ring-buffer-metadata-client.h index 0d2a1f83..3352e1f2 100644 --- a/liblttng-ust/lttng-ring-buffer-metadata-client.h +++ b/liblttng-ust/lttng-ring-buffer-metadata-client.h @@ -101,6 +101,9 @@ static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t handle); struct lttng_channel *lttng_chan = channel_get_private(chan); + assert(header); + if (!header) + return; header->magic = TSDL_MAGIC_NUMBER; memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid)); header->checksum = 0; /* 0 if unused */ @@ -129,6 +132,9 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts handle); unsigned long records_lost = 0; + assert(header); + if (!header) + return; header->content_size = data_size * CHAR_BIT; /* in bits */ header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ /*