mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 08:06:29 +00:00
Changed pg_version() prototype in order to remove the small memory leak
This commit is contained in:
@@ -81,7 +81,7 @@ main(int argc, char **argv)
|
||||
int c;
|
||||
|
||||
char conninfo[MAXLEN];
|
||||
const char *standby_version = NULL;
|
||||
char standby_version[MAXVERSIONSTR];
|
||||
|
||||
progname = get_progname(argv[0]);
|
||||
|
||||
@@ -138,7 +138,7 @@ main(int argc, char **argv)
|
||||
myLocalConn = establishDBConnection(conninfo, true);
|
||||
|
||||
/* should be v9 or better */
|
||||
standby_version = pg_version(myLocalConn);
|
||||
pg_version(myLocalConn, standby_version);
|
||||
if (strcmp(standby_version, "") == 0)
|
||||
{
|
||||
PQfinish(myLocalConn);
|
||||
|
||||
Reference in New Issue
Block a user