]> 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:15:18 +0000 (08:45 +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

(cherry picked from commit 586db4a3e4664109fe8ce31fdd6a1b9c5bb67cbf)

CHANGES
contrib/dlz/drivers/dlz_postgres_driver.c

diff --git a/CHANGES b/CHANGES
index 2bf2a6fc28e6f8bf8fc36b553466e5fae16fc80f..7e08d0ce0eb4e3208215b4eb8164cb218155f0c8 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;
                }
        }