fix memory being freed too early

This commit is contained in:
William Bell
2025-08-10 04:39:50 +01:00
parent 49b1c1858a
commit c71375c7a4
12 changed files with 126 additions and 73 deletions

View File

@@ -123,7 +123,6 @@ void darray_armem_free(darray_armem *arr, void (*free_data)(void *)) {
free_data(element);
}
}
free(arr->data);
arr->data = NULL;
arr->size = 0;
arr->capacity = 0;