summaryrefslogtreecommitdiffstats
path: root/libcnary/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcnary/node.c')
-rw-r--r--libcnary/node.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcnary/node.c b/libcnary/node.c
index c152f91..63b449c 100644
--- a/libcnary/node.c
+++ b/libcnary/node.c
@@ -312,6 +312,7 @@ node_t node_copy_deep(node_t node, copy_func_t copy_func)
return NULL;
}
if (node_attach(copy, cc) < 0) {
+ node_destroy(cc);
node_destroy(copy);
return NULL;
}