From: Jérémie Galarneau Date: Sat, 27 May 2017 18:59:30 +0000 (-0400) Subject: Fix: NULL dereference in logging on notit allocation failure X-Git-Tag: v2.0.0-pre1~152 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=4929b111b3c460f00f3f166e6172e3d7d1caed4d Fix: NULL dereference in logging on notit allocation failure Signed-off-by: Jérémie Galarneau --- diff --git a/plugins/ctf/common/notif-iter/notif-iter.c b/plugins/ctf/common/notif-iter/notif-iter.c index b2aa08e4..9a7fcb2f 100644 --- a/plugins/ctf/common/notif-iter/notif-iter.c +++ b/plugins/ctf/common/notif-iter/notif-iter.c @@ -46,7 +46,7 @@ #include #include -#define PRINT_ERR_STREAM notit->err_stream +#define PRINT_ERR_STREAM (notit ? notit->err_stream : stderr) #define PRINT_PREFIX "ctf-notif-iter" #include "../print.h"