pgpool2.git / summary / log / commit / refs
commit e15231160aca24d4bb0dede0cf8bce5550139e52
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Wed Aug 22 04:24:08 2018 +0000
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);
}
/*
[parent: bb3ffa5ed329]