Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
dlopen(3) returns a NULL pointer. Also avoid dlclose(NULL) here.
Bryan Drewery committed 12 years ago
commit a81e786e4a8f9a842451c6b1ce5fb6f65c72cb13
parent f5b7f00
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;
}