[dia] [scan-build] Dead initialization (leaks and bug)
- From: Hans Breuer <hans src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [dia] [scan-build] Dead initialization (leaks and bug)
- Date: Tue, 29 Dec 2009 19:14:27 +0000 (UTC)
commit 2691e86b527923e2cd01b623f07249aa9852ba63
Author: Hans Breuer <hans breuer org>
Date: Tue Dec 29 14:30:42 2009 +0100
[scan-build] Dead initialization (leaks and bug)
Make plot_nurbs() actually use the caclulated arrows. Also
call g_free() on arrow pointers.
plug-ins/vdx/vdx-import.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/vdx/vdx-import.c b/plug-ins/vdx/vdx-import.c
index 6800bd9..ca9f0c9 100644
--- a/plug-ins/vdx/vdx-import.c
+++ b/plug-ins/vdx/vdx-import.c
@@ -999,6 +999,8 @@ plot_polyline(const struct vdx_Geom *Geom, const struct vdx_XForm *XForm,
}
if (newobj)
vdx_simple_properties(newobj, Fill, Line, theDoc);
+ g_free(end_arrow_p);
+ g_free(start_arrow_p);
return newobj;
}
@@ -1560,6 +1562,8 @@ plot_bezier(const struct vdx_Geom *Geom, const struct vdx_XForm *XForm,
g_free(bezpoints);
if (newobj)
vdx_simple_properties(newobj, Fill, Line, theDoc);
+ g_free(end_arrow_p);
+ g_free(start_arrow_p);
return newobj;
}
@@ -1947,8 +1951,10 @@ plot_nurbs(const struct vdx_Geom *Geom, const struct vdx_XForm *XForm,
end_arrow_p = make_arrow(Line, 'e', theDoc);
}
- newobj = create_standard_polyline(num_points, points, NULL, NULL);
+ newobj = create_standard_polyline(num_points, points, end_arrow_p, start_arrow_p);
+ g_free(end_arrow_p);
+ g_free(start_arrow_p);
g_free(control);
g_free(weight);
g_free(knot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]