Memory leak in ClusterTree C implementation

Create issue
Issue #26 resolved
choy created an issue

Hi all -

Thanks for the wonderful bx-python library.

The getregions() function allocates a sorted iterator through the ClusterTree via the clusteritr() function.

The memory for these iterators is never freed.

Recommend adding a function like this to the cluster.c code and freeing the iterator memory.

/ Free an infix iterator / void freeclusteritr(treeitr *itr) { if (itr != NULL) { if (itr->next != NULL) { freeclusteritr(itr->next); } free(itr); } }

Comments (1)

  1. Log in to comment