Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
dlopen(3) returns a NULL pointer. Also avoid dlclose(NULL) here.
Bryan Drewery committed 12 years ago
commit a81e786e4a8f9a842451c6b1ce5fb6f65c72cb13
parent f5b7f003e8f41369528cbb240433298a71c260cc
1 file changed +4 -3
modified libpkg/pkg_config.c
@@ -698,11 +698,12 @@ disable_plugins_if_static(void)
		return;

	dlh = dlopen(0, 0);
-
	dlclose(dlh);

-
	/* if dlh is 0 then we are in static binary */
-
	if (dlh == 0)
+
	/* if dlh is NULL then we are in static binary */
+
	if (dlh == NULL)
		conf->boolean = false;
+
	else
+
		dlclose(dlh);

	return;
}