From: Pieter Lexis Date: Tue, 22 Mar 2016 14:45:08 +0000 (+0100) Subject: pdnsutil: Fix segfault in the gpgsql backend X-Git-Tag: dnsdist-1.0.0-beta1~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fb8d1a5af7f677da14cfa0413411cac57a3e2f9;p=thirdparty%2Fpdns.git pdnsutil: Fix segfault in the gpgsql backend Closes #3480 --- diff --git a/modules/gpgsqlbackend/spgsql.cc b/modules/gpgsqlbackend/spgsql.cc index f8954e5f6c..d45c34bde4 100644 --- a/modules/gpgsqlbackend/spgsql.cc +++ b/modules/gpgsqlbackend/spgsql.cc @@ -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;