Deserialized triggers may be leaked on error when
registered or unregistered by the session daemon.
Reported-by: Coverity Scan
CID
1374801 (#1 of 1): Resource leak (RESOURCE_LEAK)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
ret = notification_thread_command_register_trigger(notification_thread,
trigger);
+ /* Ownership of trigger was transferred. */
+ trigger = NULL;
end:
+ lttng_trigger_destroy(trigger);
lttng_dynamic_buffer_reset(&trigger_buffer);
return ret;
}
ret = notification_thread_command_unregister_trigger(notification_thread,
trigger);
end:
+ lttng_trigger_destroy(trigger);
lttng_dynamic_buffer_reset(&trigger_buffer);
return ret;
}