summaryrefslogtreecommitdiffstats
path: root/lasso/xml
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-04-22 00:44:25 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-04-22 00:44:25 +0000
commite66252fb5f38a1f20d952ba185be6b021cb0d95d (patch)
tree5e9e7ca4fdec478858523f817b785e8b479c02e3 /lasso/xml
parent34c7642226adcc643aee7bc164013d07e5780f3f (diff)
downloadlasso-e66252fb5f38a1f20d952ba185be6b021cb0d95d.tar.gz
lasso-e66252fb5f38a1f20d952ba185be6b021cb0d95d.tar.xz
lasso-e66252fb5f38a1f20d952ba185be6b021cb0d95d.zip
Fix potential SEGFAULT in _lasso_node_free_custom_element
Diffstat (limited to 'lasso/xml')
-rw-r--r--lasso/xml/xml.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c
index 8664d4da..ef80bcde 100644
--- a/lasso/xml/xml.c
+++ b/lasso/xml/xml.c
@@ -773,10 +773,12 @@ _lasso_node_new_custom_element()
static void
_lasso_node_free_custom_element(struct _CustomElement *custom_element)
{
- lasso_release_string(custom_element->prefix);
- lasso_release_string(custom_element->href);
- lasso_release_string(custom_element->nodename);
- g_hash_table_destroy(custom_element->namespaces);
+ if (custom_element) {
+ lasso_release_string(custom_element->prefix);
+ lasso_release_string(custom_element->href);
+ lasso_release_string(custom_element->nodename);
+ lasso_release_ghashtable(custom_element->namespaces);
+ }
lasso_release(custom_element);
}