diff options
Diffstat (limited to 'hacks/attraction.c')
-rw-r--r-- | hacks/attraction.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hacks/attraction.c b/hacks/attraction.c index 4fe22c2..25bc3b0 100644 --- a/hacks/attraction.c +++ b/hacks/attraction.c @@ -227,6 +227,7 @@ attraction_init (Display *dpy, Window window) progname, mode_str); exit (1); } + if (mode_str) free (mode_str); graph_mode_str = get_string_resource (dpy, "graphmode", "Mode"); if (! graph_mode_str) st->graph_mode = graph_none; @@ -241,6 +242,7 @@ attraction_init (Display *dpy, Window window) progname, graph_mode_str); exit (1); } + if (graph_mode_str) free (graph_mode_str); /* only allocate memory if it is needed */ if(st->graph_mode != graph_none) @@ -1044,6 +1046,9 @@ attraction_free (Display *dpy, Window window, void *closure) if (st->colors) free (st->colors); if (st->spl) free_spline (st->spl); + XFreeGC (dpy, st->draw_gc); + XFreeGC (dpy, st->erase_gc); + free (st); } |