From e15231160aca24d4bb0dede0cf8bce5550139e52 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Wed, 22 Aug 2018 13:24:08 +0900 Subject: [PATCH] Fix memory leak and typo in comments. --- src/tools/pgproto/extended_query.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/pgproto/extended_query.c b/src/tools/pgproto/extended_query.c index 4fc01557a..9d2f3a8aa 100644 --- a/src/tools/pgproto/extended_query.c +++ b/src/tools/pgproto/extended_query.c @@ -93,7 +93,9 @@ process_parse(char *buf, PGconn *conn) send_char('P', conn); send_int(len, conn); send_string(stmt, conn); + free(stmt); send_string(query, conn); + free(query); send_int16(noids, conn); if (noids > 0) { @@ -105,7 +107,7 @@ process_parse(char *buf, PGconn *conn) } /* - * Send bind messae. "conn" should be at the point right after the message kind + * Send bind message. "conn" should be at the point right after the message kind * was read. */ void @@ -323,6 +325,7 @@ process_describe(char *buf, PGconn *conn) send_int(len, conn); send_char(kind, conn); send_string(stmt, conn); + free(stmt); } /* -- 2.39.5