diff options
Diffstat (limited to 'libcpp/init.c')
-rw-r--r-- | libcpp/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/init.c b/libcpp/init.c index 0db167c..cc7a09e 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -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); } |