]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fix null deref in some DLZ modules
authorEvan Hunt <each@isc.org>
Sat, 14 Dec 2013 19:05:58 +0000 (11:05 -0800)
committerEvan Hunt <each@isc.org>
Sat, 14 Dec 2013 19:05:58 +0000 (11:05 -0800)
3691. [contrib] Address null pointer dereference in LDAP and
MySQL DLZ modules.

CHANGES
contrib/dlz/modules/ldap/dlz_ldap_dynamic.c
contrib/dlz/modules/mysql/dlz_mysql_dynamic.c

diff --git a/CHANGES b/CHANGES
index 75828ade810bc1e9a66e4342cf9ede0ab1f8beb0..82919648d6331b3d11d0717851bf7ff64dd55693 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3691.  [contrib]       Address null pointer dereference in LDAP and
+                       MySQL DLZ modules.
+
 3690.  [bug]           Iterative responses could be missed when the source
                        port for an upstream query was the same as the
                        listener port (53). [RT #34925]
index 3c67172f06bdab1e25b01ebf21cc6caaac9ac684..977892ac7ed85fef8c5fe6158c0ee4f048c64050 100644 (file)
@@ -1178,7 +1178,8 @@ dlz_destroy(void *dbdata) {
                ldap_instance_t *db = (ldap_instance_t *)dbdata;
 #if PTHREADS
                /* cleanup the list of DBI's */
-               ldap_destroy_dblist((db_list_t *)(db->db));
+               if (db->db != NULL)
+                       ldap_destroy_dblist((db_list_t *)(db->db));
 #else /* PTHREADS */
                if (db->db->dbconn != NULL)
                        ldap_unbind_s((LDAP *)(db->db->dbconn));
index 5227baf1be7be8fd3dda10b501dad7a931da4922..e2bff75ef6eadd611884715f9e049b89603c801b 100644 (file)
@@ -1069,7 +1069,8 @@ dlz_destroy(void *dbdata) {
        mysql_instance_t *db = (mysql_instance_t *)dbdata;
 #if PTHREADS
        /* cleanup the list of DBI's */
-       mysql_destroy_dblist((db_list_t *)(db->db));
+       if (db->db != NULL)
+               mysql_destroy_dblist((db_list_t *)(db->db));
 #else /* PTHREADS */
        mysql_destroy(db);
 #endif /* PTHREADS */