From 630d716819ef746a85d115b26f2095ce983ca628 Mon Sep 17 00:00:00 2001 From: Dan Farina Date: Mon, 7 Feb 2011 01:48:14 -0800 Subject: [PATCH] Use the proper freeing method As according to http://www.postgresql.org/docs/9.0/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING Signed-off-by: Dan Farina --- dbutils.c | 2 +- repmgr.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dbutils.c b/dbutils.c index 5cc82397..9756aa2d 100644 --- a/dbutils.c +++ b/dbutils.c @@ -210,7 +210,7 @@ getMasterConnection(PGconn *standby_conn, int id, char *cluster, strlen(schema_str)); maxlen_snprintf(schema_quoted, "%s", identifier); - free(identifier); + PQfreemem(identifier); } /* find all nodes belonging to this cluster */ diff --git a/repmgr.c b/repmgr.c index e1120f72..45626bbe 100644 --- a/repmgr.c +++ b/repmgr.c @@ -349,7 +349,7 @@ do_master_register(void) strlen(schema_str)); maxlen_snprintf(schema_quoted, "%s", identifier); - free(identifier); + PQfreemem(identifier); } /* Check if there is a schema for this cluster */ @@ -537,7 +537,7 @@ do_standby_register(void) strlen(schema_str)); maxlen_snprintf(schema_quoted, "%s", identifier); - free(identifier); + PQfreemem(identifier); } /* Check if there is a schema for this cluster */