Add missing FreeDir in CheckTablespaceDirectory

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Add missing FreeDir in CheckTablespaceDirectory
Date: 2026-10-10 09:08:15
Message-ID: 66A784B7-55C1-4613-8C24-B4C2A8D75414@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While reviewing another patch, I spotted that CheckTablespaceDirectory() in xlogrecovery.c misses to call FreeDir() after AllocateDir(). This seems to be an oversight in 9e4f914b5eba, where CheckTablespaceDirectory() was introduced.

Then I searched the source tree and didn’t find any other occurrences. Attached is a quick fix that adds the missing FreeDir().

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

Attachment Content-Type Size
v1-0001-Add-missing-FreeDir-in-CheckTablespaceDirectory.patch application/octet-stream 1.0 KB

Browse pgsql-hackers by date

  From Date Subject
Previous Message Daniel Gustafsson 2026-10-10 09:04:50 Re: docs: Table 9.46. UUID Extraction Functions