]> granicus.if.org Git - pdns/commitdiff
pdnsutil: Fix segfault in the gpgsql backend
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 22 Mar 2016 14:45:08 +0000 (15:45 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 22 Mar 2016 14:45:08 +0000 (15:45 +0100)
Closes #3480

modules/gpgsqlbackend/spgsql.cc

index f8954e5f6c74575a8472fdd3d4e41041635b92c9..d45c34bde401bac742a4a86522190f25fd43ea07 100644 (file)
@@ -77,7 +77,7 @@ public:
     if (status != PGRES_COMMAND_OK && status != PGRES_TUPLES_OK && status != PGRES_NONFATAL_ERROR) {
       string errmsg(PQresultErrorMessage(d_res_set));
       PQclear(d_res_set);
-      d_res = NULL;
+      d_res_set = NULL;
       throw SSqlException("Fatal error during query: " + d_query + string(": ") + errmsg);
     }
     d_cur_set = 0;