Skip to content

Commit 39cc3b4

Browse files
committed
Use pgut_strdup() instead of strdup().
1 parent dec54f0 commit 39cc3b4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bin/pg_repack.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,12 +1256,8 @@ repack_one_table(repack_table *table, const char *orderby)
12561256
params[0] = buffer; /* backend PID of conn2 */
12571257
params[1] = PROGRAM_NAME;
12581258
res = execute(SQL_XID_SNAPSHOT, 2, params);
1259-
if (!(vxid = strdup(PQgetvalue(res, 0, 0))))
1260-
{
1261-
elog(WARNING, "Unable to allocate vxid, length: %d\n",
1262-
PQgetlength(res, 0, 0));
1263-
goto cleanup;
1264-
}
1259+
vxid = pgut_strdup(PQgetvalue(res, 0, 0));
1260+
12651261
CLEARPGRES(res);
12661262

12671263
/* Delete any existing entries in the log table now, since we have not

0 commit comments

Comments
 (0)