projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perl plugin: Removed commented code
[collectd.git]
/
src
/
meta_data.c
diff --git
a/src/meta_data.c
b/src/meta_data.c
index
48dcabc
..
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);
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);
copy->type = orig->type;
if (copy->type == MD_TYPE_STRING)
copy->value.mv_string = strdup (orig->value.mv_string);
@@
-250,7
+252,6
@@
void meta_data_destroy (meta_data_t *md) /* {{{ */
if (md == NULL)
return;
if (md == NULL)
return;
- pthread_mutex_destroy(&md->lock);
md_entry_free (md->head);
pthread_mutex_destroy (&md->lock);
free (md);
md_entry_free (md->head);
pthread_mutex_destroy (&md->lock);
free (md);