Memory leak with XLogFileCopy since de768844 (WAL file with .partial) - Mailing list pgsql-hackers

From Michael Paquier
Subject Memory leak with XLogFileCopy since de768844 (WAL file with .partial)
Date
Msg-id CAB7nPqRSe8GTDJy74Yp3cVONx5Xx9H6Xr82sTDHbNa_b1q8zCw@mail.gmail.com
Whole thread Raw
Responses Re: Memory leak with XLogFileCopy since de768844 (WAL file with .partial)  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Hi all,

Since commit de768844, XLogFileCopy of xlog.c returns to caller a
pstrdup'd string that can be used afterwards for other things.
XLogFileCopy is used in only one place, and it happens that the result
string is never freed at all, leaking memory.
Attached is a patch to fix the problem.
Regards,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Possible pointer dereference
Next
From: Michael Paquier
Date:
Subject: Re: [BUGS] pg_get_functiondef() does not show LEAKPROOF for leakproof functions