Implement the rest of the endpoints that were already mostly C in C.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4727 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2024-01-02 23:26:42 +00:00
parent 549d7ffec8
commit 7516524d69
5 changed files with 104 additions and 24 deletions

View File

@ -205,7 +205,7 @@ tf_mem_allocation_t* tf_mem_summarize_allocations(int* out_count)
}
*out_count = summary.count;
tf_mem_allocation_t* result = tf_malloc(sizeof(tf_mem_allocation_t) * summary.count);
if (result)
if (result && summary.count)
{
memcpy(result, summary.allocations, sizeof(tf_mem_allocation_t) * summary.count);
}