loader.c: Fix error check for OOM

This commit is contained in:
Nedko Arnaudov 2023-12-25 14:51:24 +02:00
parent 61c7f6fb5f
commit 966d6a836c
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ static void set_ldpreload(const char * const * ldpreload)
if (ldpreload == NULL) return;
add = catdup_array(ldpreload, " ");
if (new == NULL)
if (add == NULL)
{
fprintf(stderr, "Memory allocation failure. Cannot catdup LD_PRELOAD array.\n");
exit(1);