Skip to content

Commit

Permalink
tds_vec: fix extra free(s) elements on remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric Deltheil committed Jan 14, 2016
1 parent a847bad commit 403337e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tds_vec.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int tds_vec_remove(tds_vec *vec, size_t idx)
tds_elem_free_content(&vec->data[idx]);
if(vec->n-idx-1 > 0)
memmove(vec->data+idx, vec->data+idx+1, sizeof(tds_elem)*(vec->n-idx-1));
tds_vec_resize(vec, vec->n-1);
vec->n--;
return 0;
}

Expand Down

0 comments on commit 403337e

Please sign in to comment.