[dia] [scan-build] Unitialized argument



commit c308a61b42f4dccb820cdd6bafad2c97b126cd36
Author: Hans Breuer <hans breuer org>
Date:   Sat Sep 26 18:24:26 2009 +0200

    [scan-build] Unitialized argument
    
    In case of malformed spline an uninitialized pointer was passed to
    g_free()
    
    http://clang-analyzer.llvm.org/scan-build

 plug-ins/xfig/xfig-import.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/xfig/xfig-import.c b/plug-ins/xfig/xfig-import.c
index 1c78097..906de01 100644
--- a/plug-ins/xfig/xfig-import.c
+++ b/plug-ins/xfig/xfig-import.c
@@ -695,7 +695,7 @@ fig_read_spline(FILE *file) {
     int forward_arrow, backward_arrow;
     Arrow *forward_arrow_info = NULL, *backward_arrow_info = NULL;
     int npoints;
-    Point *points;
+    Point *points = NULL;
     GPtrArray *props = g_ptr_array_new();
     DiaObject *newobj = NULL;
     BezPoint *bezpoints;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]