loader: save memory pointer before it's lost

The first time a library is loaded the code will
allocate space for the list. But if the dlopen fails
the pointer for that wasn't being saved and the next
call would get a segfault on a null pointer.
Now save the new pointer so it doesn't get lost.
1 file changed