local_attr = NULL;
ret = offset;
end:
+ free(local_attr);
return ret;
}
local_attr = NULL;
ret = offset;
end:
+ free(local_attr);
return ret;
}
}
if (ret != event_comm->userspace_probe_location_len) {
- WARN("Userspace probe location from the received buffer is not the advertised length: header length = %" PRIu32 ", payload length = %lu", event_comm->userspace_probe_location_len, ret);
+ WARN("Userspace probe location from the received buffer is not the advertised length: header length = %" PRIu32 ", payload length = %zd", event_comm->userspace_probe_location_len, ret);
ret = -1;
goto end;
}
}
/* Include the null terminator. */
- comm.provider_name_len = provider_len + 1;
+ provider_len += 1;
+ comm.provider_name_len = provider_len;
ctx_len = strlen(ctx_name);
if (ctx_len == 0) {
}
/* Include the null terminator. */
- comm.ctx_name_len = ctx_len + 1;
+ ctx_len += 1;
+ comm.ctx_name_len = ctx_len;
/* Header */
ret = lttng_dynamic_buffer_append(&payload->buffer, &comm,