goto end;
}
- lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ if (ret) {
+ ret = -LTTNG_ERR_NOMEM;
+ goto end;
+ }
/*
* This is needed to populate the trigger object size for the command
memset(&lsm, 0, sizeof(lsm));
lsm.cmd_type = LTTNG_UNREGISTER_TRIGGER;
- lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ ret = lttng_dynamic_buffer_append(&message.buffer, &lsm, sizeof(lsm));
+ if (ret) {
+ ret = -LTTNG_ERR_NOMEM;
+ goto end;
+ }
/*
* This is needed to populate the trigger object size for the command