X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=3f1ab9fdc4bb8f17abe91345355b11f3263d61e2;hp=4eb36a2612d952bb71d38e9cedcc4d70a47d6148;hb=97285430b75f44b6ce590e86cb9d996390e514c8;hpb=f5f5c54ddca12e77b50d8b3789de301ed61dbaee diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 4eb36a261..3f1ab9fdc 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2970,7 +2970,11 @@ int lttng_register_trigger(struct lttng_trigger *trigger) 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 @@ -3030,7 +3034,11 @@ int lttng_unregister_trigger(struct lttng_trigger *trigger) 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