From 58ecefd9b5c066a047cd3b4b464c3ee3f9c25cc2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 20 May 2020 16:44:32 +0200 Subject: initialize_filename_plus_event: Check for NULL --- libcrystfel/src/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/events.c b/libcrystfel/src/events.c index c8b6ba9d..3e23fe65 100644 --- a/libcrystfel/src/events.c +++ b/libcrystfel/src/events.c @@ -70,10 +70,10 @@ struct event_list *initialize_event_list() struct filename_plus_event *initialize_filename_plus_event() { - struct filename_plus_event *fpe; fpe = malloc(sizeof(struct filename_plus_event)); + if ( fpe == NULL ) return NULL; fpe->filename = NULL; fpe->ev = NULL; -- cgit v1.2.3