More handling of NULL.

The Wireshark version uses g_malloc which aborts automatically, but this
version just returns NULL like regular malloc does.