assert free

This commit is contained in:
c9s 2014-06-01 01:26:36 +08:00
parent 188a687150
commit 4f93a530e1

View file

@ -24,6 +24,7 @@ str_array * str_array_create(int cap) {
} }
void str_array_free(str_array *l) { void str_array_free(str_array *l) {
assert(l);
for ( int i = 0; i < l->len ; i++ ) { for ( int i = 0; i < l->len ; i++ ) {
if (l->tokens[ i ]) { if (l->tokens[ i ]) {
zfree(l->tokens[i]); zfree(l->tokens[i]);