Skip to content
Snippets Groups Projects
Commit 2adf1459 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix CID 465170

parent 0bd7a0af
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -2444,8 +2444,10 @@ void* new_item(void* lp, size_t size, int index, int* total)
if((item = calloc(size, 1)) == NULL)
return NULL;
if((p = realloc(list, size * ((*total) + 1))) == NULL)
if((p = realloc(list, size * ((*total) + 1))) == NULL) {
free(item);
return NULL;
}
list = p;
for(int i = *total; i > index; --i)
list[i] = list[i - 1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment