Skip to content

Commit e4c4565

Browse files
author
Sokolov Yura
committed
[PGPRO-874] cfs.c: fix memory leak
1 parent 6db1edf commit e4c4565

File tree

1 file changed

+3
-3
lines changed
  • src/backend/storage/file

1 file changed

+3
-3
lines changed

src/backend/storage/file/cfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,9 +1303,6 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
13031303
secs2*USECS_PER_SEC + usecs2);
13041304
}
13051305

1306-
pfree(file_path);
1307-
pfree(file_bck_path);
1308-
pfree(map_bck_path);
13091306
pfree(inodes);
13101307
pfree(newMap);
13111308

@@ -1328,6 +1325,9 @@ static bool cfs_gc_file(char* map_path, GC_CALL_KIND background)
13281325
}
13291326

13301327
FinishGC:
1328+
pfree(file_path);
1329+
pfree(file_bck_path);
1330+
pfree(map_bck_path);
13311331
if (background == CFS_BACKGROUND)
13321332
{
13331333
LWLockRelease(CfsGcLock);

0 commit comments

Comments
 (0)