mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
Fix NULL pointer dereference in tuplesort.c.
Oversight in commit e94568ecc
. This could cause a crash when an external
datum tuplesort of a pass-by-value type required multiple passes.
Per report from Mithun Cy.
Peter Geoghegan
Discussion: https://postgr.es/m/CAD__OujuhfWFULGFSt1fyHqUb8N-XafjJhudwt88V0Qs2o84qg@mail.gmail.com
This commit is contained in:
parent
fcf708623e
commit
4e46c97fde
@ -2800,7 +2800,8 @@ mergeonerun(Tuplesortstate *state)
|
||||
WRITETUP(state, destTape, &state->memtuples[0]);
|
||||
|
||||
/* recycle the slot of the tuple we just wrote out, for the next read */
|
||||
RELEASE_SLAB_SLOT(state, state->memtuples[0].tuple);
|
||||
if (state->memtuples[0].tuple)
|
||||
RELEASE_SLAB_SLOT(state, state->memtuples[0].tuple);
|
||||
|
||||
/*
|
||||
* pull next tuple from the tape, and replace the written-out tuple in
|
||||
|
Loading…
Reference in New Issue
Block a user