Skip to content

Commit 6d5aae7

Browse files
committed
Now that the shared library name can be adjusted in the library test,
have pg_upgrade allocate a maximum fixed size buffer for testing the library file name, rather than base the allocation on the library name. Backpatch to 9.1.
1 parent a7f2c79 commit 6d5aae7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contrib/pg_upgrade/function.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ check_loadable_libraries(void)
225225
{
226226
char *lib = os_info.libraries[libnum];
227227
int llen = strlen(lib);
228-
char *cmd = (char *) pg_malloc(8 + 2 * llen + 1);
228+
char cmd[7 + 2 * MAXPGPATH + 1];
229229
PGresult *res;
230230

231231
/*
@@ -266,7 +266,6 @@ check_loadable_libraries(void)
266266
}
267267

268268
PQclear(res);
269-
pg_free(cmd);
270269
}
271270

272271
PQfinish(conn);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy