summaryrefslogtreecommitdiff
path: root/kicad/lib-parse.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-30 15:14:23 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-30 15:16:55 -0300
commitfefaf1bd733e241242e1f75ba04d932f17951354 (patch)
treea88cf0fb5de37b3ea0e3732a11d63a891dcbc1db /kicad/lib-parse.c
parent35f2c9c26e6d7975e4c29eaa79dd10e29f24dea4 (diff)
downloadeeshow-fefaf1bd733e241242e1f75ba04d932f17951354.tar.gz
eeshow-fefaf1bd733e241242e1f75ba04d932f17951354.tar.bz2
eeshow-fefaf1bd733e241242e1f75ba04d932f17951354.zip
fix a few memory leaks (in non-interactive mode)
We now leak less than 1 MB on valgrind --leak-check=full eeshow -N 1 neo900.pro -- png -o foo.png instead of about 3.5 MB. The plan is as follows: - fix memory leaks in simple operations in on-interactive mode, - suppress what cannot be fixed (e.g., when comes from libraries), - move on to more complex operations, - then start fixing interactive mode.
Diffstat (limited to 'kicad/lib-parse.c')
-rw-r--r--kicad/lib-parse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kicad/lib-parse.c b/kicad/lib-parse.c
index e24e37a..e2f8a29 100644
--- a/kicad/lib-parse.c
+++ b/kicad/lib-parse.c
@@ -360,6 +360,10 @@ static void free_objs(struct lib_obj *objs)
while (objs) {
next = objs->next;
switch (objs->type) {
+ case lib_obj_poly:
+ free(objs->u.poly.x);
+ free(objs->u.poly.y);
+ break;
case lib_obj_text:
free((char *) objs->u.text.s);
break;