mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 07:40:00 -04:00
Fix possible NULL dereference in cd->dlz_destroy()
If the call to cd->dlz_create() in dlopen_dlz_create() fails, cd->dbdata may be NULL when dlopen_dlz_destroy() gets called in the cleanup path and passing NULL to the cd->dlz_destroy() callback may cause a NULL dereference. Ensure that does not happen by checking whether cd->dbdata is non-NULL before calling the cd->dlz_destroy() callback.
This commit is contained in:
parent
37b9511ce1
commit
38f34c266d
1 changed files with 1 additions and 1 deletions
|
|
@ -339,7 +339,7 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
|
|||
|
||||
UNUSED(driverarg);
|
||||
|
||||
if (cd->dlz_destroy) {
|
||||
if (cd->dlz_destroy && cd->dbdata) {
|
||||
MAYBE_LOCK(cd);
|
||||
cd->dlz_destroy(cd->dbdata);
|
||||
MAYBE_UNLOCK(cd);
|
||||
|
|
|
|||
Loading…
Reference in a new issue