Browse Source

Set vector contents to NULL upon freeing

master
parent
commit
2f7f1a8a40
  1. 1
      src/cvec.c

1
src/cvec.c

@ -27,6 +27,7 @@ cvec cvec_new(size_t data_size, size_t cap) {
void cvec_free(cvec* vec) {
if (vec) {
free(vec->contents);
vec->contents = NULL;
vec = NULL;
}
}

Loading…
Cancel
Save