diff options
Diffstat (limited to 'collections/vector/vector.c')
-rw-r--r-- | collections/vector/vector.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/collections/vector/vector.c b/collections/vector/vector.c index c456d8a..391b5a6 100644 --- a/collections/vector/vector.c +++ b/collections/vector/vector.c @@ -108,10 +108,13 @@ vec *root; char* to_string(void*); { int i; + char *tmp; printf("["); for(i = 0; i < root->end; i++) { - printf("%s", to_string(vec_index(root, i))); + printf("%s", tmp = to_string(vec_index(root, i))); + free(tmp); + tmp = NULL; } printf("\b]\n"); |