OSDN Git Service

2008-11-26 Kai Tietz <kai.tietz@onevision.com>
[pf3gnuchains/gcc-fork.git] / libcpp / init.c
index 0db167c..cc7a09e 100644 (file)
@@ -245,6 +245,7 @@ cpp_destroy (cpp_reader *pfile)
 {
   cpp_context *context, *contextn;
   tokenrun *run, *runn;
+  int i;
 
   free (pfile->op_stack);
 
@@ -287,6 +288,14 @@ cpp_destroy (cpp_reader *pfile)
       free (context);
     }
 
+  if (pfile->comments.entries)
+    {
+      for (i = 0; i < pfile->comments.count; i++)
+       free (pfile->comments.entries[i].comment);
+
+      free (pfile->comments.entries);
+    }
+
   free (pfile);
 }