dlopen(3) returns a NULL pointer. Also avoid dlclose(NULL) here.

Reported by:	Coverity Scan