projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
postgresql plugin: Register a new user data pointer with udb_query_set_user_data...
[collectd.git]
/
src
/
utils_fbhash.c
diff --git
a/src/utils_fbhash.c
b/src/utils_fbhash.c
index
d20b7e3
..
7513729
100644
(file)
--- a/
src/utils_fbhash.c
+++ b/
src/utils_fbhash.c
@@
-36,7
+36,7
@@
struct fbhash_s
c_avl_tree_t *tree;
};
c_avl_tree_t *tree;
};
-/*
+/*
* Private functions
*/
static void fbh_free_tree (c_avl_tree_t *tree) /* {{{ */
* Private functions
*/
static void fbh_free_tree (c_avl_tree_t *tree) /* {{{ */
@@
-193,7
+193,7
@@
static int fbh_check_file (fbhash_t *h) /* {{{ */
return (status);
} /* }}} int fbh_check_file */
return (status);
} /* }}} int fbh_check_file */
-/*
+/*
* Public functions
*/
fbhash_t *fbh_create (const char *file) /* {{{ */
* Public functions
*/
fbhash_t *fbh_create (const char *file) /* {{{ */
@@
-223,6
+223,7
@@
fbhash_t *fbh_create (const char *file) /* {{{ */
if (status != 0)
{
fbh_destroy (h);
if (status != 0)
{
fbh_destroy (h);
+ free (h);
return (NULL);
}
return (NULL);
}
@@
-234,6
+235,7
@@
void fbh_destroy (fbhash_t *h) /* {{{ */
if (h == NULL)
return;
if (h == NULL)
return;
+ pthread_mutex_destroy (&h->lock);
free (h->filename);
fbh_free_tree (h->tree);
} /* }}} void fbh_destroy */
free (h->filename);
fbh_free_tree (h->tree);
} /* }}} void fbh_destroy */