pgsql: Fix actual and potential double-frees around tuplesort usage.

2018-03-28 Thread Tom Lane
Fix actual and potential double-frees around tuplesort usage. tuplesort_gettupleslot() passed back tuples allocated in the tuplesort's own memory context, even when the caller was responsible to free them. This created a double-free hazard, because some callers might destroy the tuplesort object (

pgsql: Fix actual and potential double-frees around tuplesort usage.

2018-03-28 Thread Tom Lane
Fix actual and potential double-frees around tuplesort usage. tuplesort_gettupleslot() passed back tuples allocated in the tuplesort's own memory context, even when the caller was responsible to free them. This created a double-free hazard, because some callers might destroy the tuplesort object (

pgsql: Fix actual and potential double-frees around tuplesort usage.

2018-03-28 Thread Tom Lane
Fix actual and potential double-frees around tuplesort usage. tuplesort_gettupleslot() passed back tuples allocated in the tuplesort's own memory context, even when the caller was responsible to free them. This created a double-free hazard, because some callers might destroy the tuplesort object (

pgsql: Fix actual and potential double-frees around tuplesort usage.

2018-03-28 Thread Tom Lane
Fix actual and potential double-frees around tuplesort usage. tuplesort_gettupleslot() passed back tuples allocated in the tuplesort's own memory context, even when the caller was responsible to free them. This created a double-free hazard, because some callers might destroy the tuplesort object (