memory leak fixed

This commit is contained in:
berat
2017-09-23 19:55:47 +02:00
parent 41b40ddf18
commit baae16ec2f
+3 -2
View File
@@ -945,13 +945,14 @@ int updateIpTree(const char *key, addr_node **vrootp, const char *proto) {
/* *********************************************** */
void freeIpTree(addr_node *root) {
if (root != NULL){
if (root == NULL)
return;
freeIpTree(root->left);
freeIpTree(root->right);
free(root);
root = NULL;
}
}
/* *********************************************** */