From 90e312cb85df7a6dc350cb62138ab950790e3d15 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 8 Sep 2011 16:42:37 -0400 Subject: [PATCH] [util] Move code around --- util/hb-view.cc | 5 ----- util/options.hh | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/util/hb-view.cc b/util/hb-view.cc index d89835cde..ff4a33af6 100644 --- a/util/hb-view.cc +++ b/util/hb-view.cc @@ -253,9 +253,6 @@ main (int argc, char **argv) } if (debug) { - free (shape_opts->features); - g_free (shape_opts->shapers); - cairo_pattern_destroy (fore_pattern); cairo_pattern_destroy (back_pattern); cairo_surface_destroy (surface); @@ -268,5 +265,3 @@ main (int argc, char **argv) return 0; } - - diff --git a/util/options.hh b/util/options.hh index 716d1ad7c..e4f131603 100644 --- a/util/options.hh +++ b/util/options.hh @@ -58,6 +58,10 @@ extern struct shape_options_t shape_options_t (void) { memset (this, 0, sizeof (*this)); } + ~shape_options_t (void) { + free (features); + g_free (shapers); + } const char *text; const char *direction;