branch: externals/pq
commit cdc04b0b611c15709f5ebc55d2db2d94126ee5f5
Author: Mario Rodas <mar...@users.noreply.github.com>
Commit: Mario Rodas <mar...@users.noreply.github.com>

    Add missing PQclear calls
---
 pq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pq.c b/pq.c
index 6100ee3987..2f1b5d4839 100644
--- a/pq.c
+++ b/pq.c
@@ -103,10 +103,12 @@ Fpq_connectdb (emacs_env *env, ptrdiff_t nargs, 
emacs_value args[], void *data)
   PGresult *res = PQexec(conn, "set client_encoding to utf8");
   if (!result_ok(env, res))
     return Qnil;
+  PQclear(res);
   res = PQexec(conn, "set application_name to emacs");
   if (!result_ok(env, res))
     return Qnil;
 
+  PQclear(res);
   if (nargs)
     free(conninfo);
 

Reply via email to