Fix memleak in vector_realloc.

This commit is contained in:
Ingo van Lil 2016-01-24 11:26:05 +01:00
parent e4644f70aa
commit 0b52f40933
1 changed files with 1 additions and 0 deletions

View File

@ -47,6 +47,7 @@ int vector_realloc(struct vector *v, int capacity)
v->ptr = new_ptr;
} else {
free(v->ptr);
v->ptr = NULL;
}