From: Ruben Kerkhof Date: Sat, 5 Dec 2015 13:20:29 +0000 (+0100) Subject: meta_data.c: check return value of md_entry_alloc X-Git-Tag: collectd-5.5.1~24^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ac8f02ab4f25a6b62ec763a74442ae2d65450679;p=collectd.git meta_data.c: check return value of md_entry_alloc CID #37986 Signed-off-by: Florian Forster --- 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);