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 <daniel@heroku.com>
This commit is contained in:
Dan Farina
2011-02-07 01:48:14 -08:00
parent c1b84fe9fc
commit 630d716819
2 changed files with 3 additions and 3 deletions

View File

@@ -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 */

View File

@@ -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 */