]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3900. [bug] Fix a crash in PostgreSQL DLZ driver. [RT #36637]
authorMukund Sivaraman <muks@isc.org>
Mon, 28 Jul 2014 03:11:59 +0000 (08:41 +0530)
committerMukund Sivaraman <muks@isc.org>
Mon, 28 Jul 2014 03:11:59 +0000 (08:41 +0530)
Squashed commit of the following:

commit ebdade4dfe59fc11d3c4ad8111729f722aab2008
Author: Mukund Sivaraman <muks@isc.org>
Date:   Thu Jul 24 22:52:54 2014 +0530

    Move statement to be after comment

commit 4b5d6a33350a469afb8e273bc552055824a32570
Author: Mukund Sivaraman <muks@isc.org>
Date:   Thu Jul 24 21:42:52 2014 +0530

    Return NULL in *rs so that caller doesn't PQclear() it again

CHANGES
contrib/dlz/drivers/dlz_postgres_driver.c

diff --git a/CHANGES b/CHANGES
index b2bcd033a014464b3a303233aaf5a6f93a178dea..ba766b8e2431e3932f3e8c6b491763522c258c0a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3900.  [bug]           Fix a crash in PostgreSQL DLZ driver. [RT #36637]
+
 3899.  [bug]           "request-ixfr" is only applicable to slave and redirect
                        zones. [RT #36608]
 
index ac64c8fbe8309aa3e77207a860504e2b05753663..6c6082dad27138f77ee776ad9699b3542f82999a 100644 (file)
@@ -577,6 +577,7 @@ postgres_get_resultset(const char *zone, const char *record,
 #endif
                        PQclear(*rs);   /* get rid of it */
                        /* in case this was the last attempt */
+                       *rs = NULL;
                        result = ISC_R_FAILURE;
                }
        }