From ac8f02ab4f25a6b62ec763a74442ae2d65450679 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 5 Dec 2015 14:20:29 +0100 Subject: [PATCH] meta_data.c: check return value of md_entry_alloc CID #37986 Signed-off-by: Florian Forster --- src/meta_data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/meta_data.c b/src/meta_data.c index b6483e8b..0fc58ff5 100644 --- a/src/meta_data.c +++ b/src/meta_data.c @@ -109,6 +109,8 @@ static meta_entry_t *md_entry_clone (const meta_entry_t *orig) /* {{{ */ return (NULL); copy = md_entry_alloc (orig->key); + if (copy == NULL) + return (NULL); copy->type = orig->type; if (copy->type == MD_TYPE_STRING) copy->value.mv_string = strdup (orig->value.mv_string); -- 2.30.2