[cairo-commit] cairo/src cairo-path-data.c,1.4,1.5

Olivier Andrieu commit at pdx.freedesktop.org
Thu May 26 17:35:37 PDT 2005


Committed by: oandrieu

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv17646/src

Modified Files:
	cairo-path-data.c 
Log Message:
* src/cairo-path-data.c (_cpdc_curve_to_flatten),
  (_cpdp_curve_to_flatten) : Fix memory leak


Index: cairo-path-data.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-path-data.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cairo-path-data.c	11 May 2005 03:45:55 -0000	1.4
+++ cairo-path-data.c	27 May 2005 00:35:35 -0000	1.5
@@ -105,14 +105,18 @@
 
     status = _cairo_spline_decompose (&spline, cpdc->tolerance);
     if (status)
-	return status;
+      goto out;
 
     for (i=1; i < spline.num_points; i++)
 	_cpdc_line_to (cpdc, &spline.points[i]);
 
     cpdc->current_point = *p3;
 
-    return CAIRO_STATUS_SUCCESS;
+    status = CAIRO_STATUS_SUCCESS;
+
+ out:
+    _cairo_spline_fini (&spline);
+    return status;
 }
 
 static cairo_status_t
@@ -276,14 +280,18 @@
 
     status = _cairo_spline_decompose (&spline, cpdp->gstate->tolerance);
     if (status)
-	return status;
+      goto out;
 
     for (i=1; i < spline.num_points; i++)
 	_cpdp_line_to (cpdp, &spline.points[i]);
 
     cpdp->current_point = *p3;
 
-    return CAIRO_STATUS_SUCCESS;
+    status = CAIRO_STATUS_SUCCESS;
+
+ out:
+    _cairo_spline_fini (&spline);
+    return status;
 }
 
 static cairo_status_t




More information about the cairo-commit mailing list