libcnary: Fix leak on error in node_copy_deep()

This commit is contained in:
Nikias Bassen
2026-02-13 00:48:34 +01:00
parent 9969b8ebeb
commit 70fd355f94
+1
View File
@@ -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;
}