[lttng-dev] [BABELTRACE PATCH] Fix: check return value of bt_context_create

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Aug 21 10:45:33 EDT 2012


* Julien Desfossez (jdesfossez at efficios.com) wrote:
> Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>

Merged, thanks!

Mathieu

> ---
>  converter/babeltrace.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/converter/babeltrace.c b/converter/babeltrace.c
> index f5541d2..c9007c3 100644
> --- a/converter/babeltrace.c
> +++ b/converter/babeltrace.c
> @@ -549,6 +549,9 @@ int main(int argc, char **argv)
>  	}
>  
>  	ctx = bt_context_create();
> +	if (!ctx) {
> +		goto error_td_read;
> +	}
>  
>  	ret = bt_context_add_traces_recursive(ctx, opt_input_path,
>  			opt_input_format, NULL);
> -- 
> 1.7.10.4
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list