From: erg Date: Wed, 20 Jun 2007 18:49:13 +0000 (+0000) Subject: Fix memory leak in pointset. X-Git-Tag: LAST_LIBGRAPH~32^2~5539 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf2ca6f3685e469bd4e0e3aa499464cbcfd94ea9;p=graphviz Fix memory leak in pointset. --- diff --git a/lib/common/pointset.c b/lib/common/pointset.c index 3c098d3f1..a28236395 100644 --- a/lib/common/pointset.c +++ b/lib/common/pointset.c @@ -31,6 +31,11 @@ static pair *mkPair(point p) return pp; } +static void freePair(Dt_t * d, pair* pp, Dtdisc_t * disc) +{ + free (pp); +} + static int cmppair(Dt_t * d, point * key1, point * key2, Dtdisc_t * disc) { if (key1->x > key2->x) @@ -50,7 +55,7 @@ static Dtdisc_t intPairDisc = { sizeof(point), offsetof(pair, link), 0, - 0, + (Dtfree_f) freePair, (Dtcompar_f) cmppair, 0, 0,