projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7462900
)
meta_data.c: check return value of md_entry_alloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Dec 2015 13:20:29 +0000
(14:20 +0100)
committer
Florian Forster
<octo@collectd.org>
Sat, 5 Dec 2015 21:56:38 +0000
(22:56 +0100)
CID #37986
Signed-off-by: Florian Forster <octo@collectd.org>
src/meta_data.c
patch
|
blob
|
history
diff --git
a/src/meta_data.c
b/src/meta_data.c
index
b6483e8
..
0fc58ff
100644
(file)
--- 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);