Re: [bug fix] Memory leak in dblink
От | Tom Lane |
---|---|
Тема | Re: [bug fix] Memory leak in dblink |
Дата | |
Msg-id | 12576.1403149350@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [bug fix] Memory leak in dblink (Joe Conway <mail@joeconway.com>) |
Список | pgsql-hackers |
Joe Conway <mail@joeconway.com> writes: > On 06/18/2014 08:19 PM, Tom Lane wrote: >> Actually, I was wondering whether we couldn't remove that >> CreateTupleDescCopy call entirely. > Apparently not, at least without some additional surgery. > ExecMakeTableFunctionResult() tries to free the tupledesc and segfaults. Hmm ... oh, I missed this bit: /* We must get the tupledesc from call context */ if (rsinfo && IsA(rsinfo, ReturnSetInfo) && rsinfo->expectedDesc != NULL) { result = TYPEFUNC_COMPOSITE; if (resultTupleDesc) *resultTupleDesc = rsinfo->expectedDesc; /* Assume no polymorphic columnshere, either */ } So it's passing back the same tupdesc passed in by the caller of ExecMakeTableFunctionResult. We can free that all right, but the caller won't be happy :-( regards, tom lane
В списке pgsql-hackers по дате отправления: