Fixed memory leak.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 19 Feb 2009 04:05:37 -0500
changeset 674 8ab124b33d3c
parent 673 4b14154df11b
child 675 e85587e4650d
Fixed memory leak.
mojoshader_preprocessor.c
--- a/mojoshader_preprocessor.c	Thu Feb 19 04:00:21 2009 -0500
+++ b/mojoshader_preprocessor.c	Thu Feb 19 04:05:37 2009 -0500
@@ -961,7 +961,8 @@
         return;
 
     assert(done);
-    add_define(ctx, sym, definition, 0);
+    if (!add_define(ctx, sym, definition, 0))
+        Free(ctx, definition);
 } // handle_pp_define