summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stream.c b/src/stream.c
index 77779aae..4a179247 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -53,6 +53,7 @@ void stream_impl_push_line( struct stream_impl_data *ss, int ll )
int lines_alloc_new = ss->lines_alloc * 2;
int *line_len_new = malloc( sizeof(int) * lines_alloc_new );
memcpy( line_len_new, ss->line_len, sizeof(int) * ss->lines_alloc );
+ free( ss->line_len );
ss->lines_alloc = lines_alloc_new;
ss->line_len = line_len_new;
}
@@ -372,6 +373,9 @@ static void data_destructor( program_t *prg, tree_t **sp, struct stream_impl_dat
// if ( si->name != 0 )
// free( si->name );
+ if ( si->line_len != 0 )
+ free( si->line_len );
+
free( si );
}