Mike McCormack : msi: Fix some memory leaks in the condition parser.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 27 05:42:25 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 31c5652dc6334e34fd2dc78baf7335cbc3670f7e
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=31c5652dc6334e34fd2dc78baf7335cbc3670f7e

Author: Mike McCormack <mike at codeweavers.com>
Date:   Thu Jul 27 11:23:41 2006 +0900

msi: Fix some memory leaks in the condition parser.

---

 dlls/msi/cond.y |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y
index 1809935..6226e29 100644
--- a/dlls/msi/cond.y
+++ b/dlls/msi/cond.y
@@ -186,6 +186,7 @@ boolean_factor:
   | value_s
         {
             $$ = ($1 && $1[0]) ? 1 : 0;
+            msi_free($1);
         }
   | value_i operator value_i
         {
@@ -198,6 +199,7 @@ boolean_factor:
                 $$ = compare_int( num, $2, $3 );
             else 
                 $$ = ($2 == COND_NE || $2 == COND_INE );
+            msi_free($1);
         }
   | value_i operator symbol_s
         {
@@ -206,6 +208,7 @@ boolean_factor:
                 $$ = compare_int( $1, $2, num );
             else 
                 $$ = ($2 == COND_NE || $2 == COND_INE );
+            msi_free($3);
         }
   | symbol_s operator symbol_s
         {
@@ -226,10 +229,12 @@ boolean_factor:
   | literal operator value_i
         {
             $$ = 0;
+            msi_free($1);
         }
   | value_i operator literal
         {
             $$ = 0;
+            msi_free($3);
         }
   | COND_LPAR expression COND_RPAR
         {




More information about the wine-cvs mailing list