]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
Clean up properly
authorDaniel Silverstone <dsilvers@digital-scurf.org>
Sat, 3 Nov 2012 18:03:23 +0000 (18:03 +0000)
committerDaniel Silverstone <dsilvers@digital-scurf.org>
Sat, 3 Nov 2012 18:03:23 +0000 (18:03 +0000)
src/svgtiny.c

index 18884a11f45012ab3ca2940971b2da829d736691..0dd50289bad7ccfeb56887b2f94a9cf93443afe3 100644 (file)
@@ -205,10 +205,18 @@ svgtiny_code svgtiny_parse(struct svgtiny_diagram *diagram,
        dom_node_unref(document);
 
 cleanup:
+       if (state.gradient_x1 != NULL)
+               dom_string_unref(state.gradient_x1);
+       if (state.gradient_x2 != NULL)
+               dom_string_unref(state.gradient_x2);
+       if (state.gradient_y1 != NULL)
+               dom_string_unref(state.gradient_y1);
+       if (state.gradient_y2 != NULL)
+               dom_string_unref(state.gradient_y2);
 #define SVGTINY_STRING_ACTION2(s,n)                    \
        if (state.interned_##s != NULL)                 \
                dom_string_unref(state.interned_##s);
-//#include "svgtiny_strings.h"
+#include "svgtiny_strings.h"
 #undef SVGTINY_STRING_ACTION2
        return code;
 }