]> granicus.if.org Git - pdns/commitdiff
eleksir noted that we leak a ton of memory in postgresql. I'm no postgres expert...
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 11 Sep 2016 18:40:44 +0000 (20:40 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 11 Sep 2016 18:42:00 +0000 (20:42 +0200)
modules/gpgsqlbackend/spgsql.cc

index 860a2db47b6b5be9d5e2254b33fce0b67ebb021b..ed80d4c53bc3bbeaf5a269339d692a6f15da0f3f 100644 (file)
@@ -77,7 +77,8 @@ public:
       L<<Logger::Warning<<"Query: "<<d_query<<endl;
     }
     if (!d_parent->in_trx()) {
-      PQexec(d_db(),"BEGIN");
+      auto res=PQexec(d_db(),"BEGIN");
+      PQclear(res);
       d_do_commit = true;
     } else d_do_commit = false;
     d_res_set = PQexecPrepared(d_db(), d_stmt.c_str(), d_nparams, paramValues, paramLengths, NULL, 0);