浏览代码

Fix memory leak (bug https://trac.osgeo.org/grass/ticket/2063)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57540 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 11 年之前
父节点
当前提交
98cf6d5008
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/raster/color_rules.c

+ 2 - 0
lib/raster/color_rules.c

@@ -253,6 +253,8 @@ int Rast_read_color_rules(struct Colors *colors, DCELL min, DCELL max,
 			      &hi->val, hi->r, hi->g, hi->b, colors);
 			      &hi->val, hi->r, hi->g, hi->b, colors);
     }
     }
 
 
+    G_free(rule);
+
     /* null value and default color set up, if rules are set up by user */
     /* null value and default color set up, if rules are set up by user */
     if (null.set)
     if (null.set)
 	Rast_set_null_value_color(null.r, null.g, null.b, colors);
 	Rast_set_null_value_color(null.r, null.g, null.b, colors);