Alvaro Herrera <alvherre@commandprompt.com> writes:
> I think a patch to solve this is as simple as the attached.
I guess I need to point out that those ereport calls already pose a far
more substantial risk of palloc failure than the DLNewElem represents.
You seem to have forgotten about releasing the DLElem if the fork fails,
too.
regards, tom lane