Skip to content

Commit dbaeda1

Browse files
committed
Fix leaked var in tde archiver tools
aka make sanitizers happy
1 parent b709662 commit dbaeda1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

contrib/pg_tde/src/bin/pg_tde_archive_decrypt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ main(int argc, char *argv[])
212212
if (system(command) != 0)
213213
pg_fatal("ARCHIVE-COMMAND \"%s\" failed: %m", command);
214214

215+
free(command);
216+
215217
if (issegment)
216218
{
217219
if (unlink(tmppath) < 0)

contrib/pg_tde/src/bin/pg_tde_restore_encrypt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ main(int argc, char *argv[])
205205
if (system(command) != 0)
206206
pg_fatal("RESTORE-COMMAND \"%s\" failed: %m", command);
207207

208+
free(command);
209+
208210
if (issegment)
209211
{
210212
write_encrypted_segment(targetpath, sourcename, tmppath);

0 commit comments

Comments
 (0)