From 06d714ac1654f84e0330717951515f7ae8793077 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 14 Jun 2010 17:53:20 +0200 Subject: [PATCH] graph_list.c: Improve error handling in one little case. --- graph_list.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/graph_list.c b/graph_list.c index fc63620..80fab28 100644 --- a/graph_list.c +++ b/graph_list.c @@ -183,6 +183,12 @@ static graph_instance_t *instance_create (graph_config_t *cfg, /* {{{ */ i->select = ident_copy_with_selector (cfg->select, file, IDENT_FLAG_REPLACE_ANY); + if (i->select == NULL) + { + DEBUG ("instance_create: ident_copy_with_selector returned NULL.\n"); + free (i); + return (NULL); + } i->files = NULL; i->files_num = 0; -- 2.30.2