fix: malloc error handling

This commit is contained in:
wiesendsi102436 committed 2025-11-30 12:12:45 +01:00
1 parent 1c27338be2
commit 5050836020
1 file changed
+5
+5
View File
@@ -26,6 +26,11 @@ unsigned int *createNumbers(unsigned int len)
{
unsigned int *randomNumbers = malloc(len * sizeof(int));
if (!randomNumbers)
{
return NULL;
}
// including upper limit
int upperLimit = len * 2;