summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-25 03:36:25 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-25 03:36:25 +0100
commit990d345674c6dc7d8f07655d1d2e1ea61d173853 (patch)
tree42b9d8d65bf5c1608af23f4070cf57ec06bc7c6d /src
parent720b8692c453b14829b85b0c5647e7babe7a4752 (diff)
downloadconnman-990d345674c6dc7d8f07655d1d2e1ea61d173853.tar.gz
connman-990d345674c6dc7d8f07655d1d2e1ea61d173853.tar.bz2
connman-990d345674c6dc7d8f07655d1d2e1ea61d173853.zip
Add destruct callback to element structure
Diffstat (limited to 'src')
-rw-r--r--src/element.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/element.c b/src/element.c
index 145d6fa2..fba5fb88 100644
--- a/src/element.c
+++ b/src/element.c
@@ -1192,6 +1192,8 @@ void connman_element_unref(struct connman_element *element)
g_atomic_int_get(&element->refcount) - 1);
if (g_atomic_int_dec_and_test(&element->refcount) == TRUE) {
+ if (element->destruct)
+ element->destruct(element);
free_properties(element);
g_free(element->ipv4.address);
g_free(element->ipv4.netmask);