libdl: Fix allocator NULL check (Coverity 1255328) refs #2191
The address returned from the allocator call was not checked when zeroing the memory.