Oops, use calloc in _lovrAlloc;

This commit is contained in:
bjorn 2019-01-29 20:08:10 -08:00
parent 3aec7f7767
commit f5a903a805
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ void lovrThrow(const char* format, ...) {
}
void* _lovrAlloc(const char* type, size_t size, void (*destructor)(void*)) {
Ref* ref = malloc(size);
Ref* ref = calloc(1, size);
lovrAssert(ref, "Out of memory");
ref->destructor = destructor;
ref->type = type;