]> granicus.if.org Git - graphviz/commitdiff
Fix memory leak in pointset.
authorerg <devnull@localhost>
Wed, 20 Jun 2007 18:49:13 +0000 (18:49 +0000)
committererg <devnull@localhost>
Wed, 20 Jun 2007 18:49:13 +0000 (18:49 +0000)
lib/common/pointset.c

index 3c098d3f1240630ca75f60e75d72d560dfc5b7e7..a282363953cb03927b03cf96b6c3f1c967a107d0 100644 (file)
@@ -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,