[lttng-dev] [PATCH lttng-tools] Fix: return NULL pointer on memory allocation failure

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue May 9 12:37:16 UTC 2017


Merged in master and stable-2.10, thanks!

Jérémie

On 8 May 2017 at 07:48, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
>  src/common/buffer-usage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/common/buffer-usage.c b/src/common/buffer-usage.c
> index 49696a3..dfe0d85 100644
> --- a/src/common/buffer-usage.c
> +++ b/src/common/buffer-usage.c
> @@ -231,7 +231,7 @@ struct lttng_condition *lttng_condition_buffer_usage_create(
>
>         condition = zmalloc(sizeof(struct lttng_condition_buffer_usage));
>         if (!condition) {
> -               goto end;
> +               return NULL;
>         }
>
>         lttng_condition_init(&condition->parent, type);
> --
> 2.1.4
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list