X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-metadata-client.h;h=3352e1f29649cd4154d6e81ed2fd61da60f64d16;hb=ebd4c257bc3ca6b659a90ee6219f5389fb3ab5e5;hp=0d2a1f838e623ab8147221f23ed4e9ad3a487720;hpb=9f8140ba23fd62cad18be0f58193480e6b5aaae6;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 */ /*