From: Robert Haas Date: Tue, 29 Apr 2014 15:31:41 +0000 (-0400) Subject: Fix a bug. X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=25b64c31e81e71df36bf5016af0c072e04d4868f;p=users%2Frhaas%2Fpostgres.git Fix a bug. --- diff --git a/src/backend/utils/mmgr/sb_alloc.c b/src/backend/utils/mmgr/sb_alloc.c index 7b983a4d66..d8923fdca8 100644 --- a/src/backend/utils/mmgr/sb_alloc.c +++ b/src/backend/utils/mmgr/sb_alloc.c @@ -341,9 +341,9 @@ sb_free(void *ptr) relptr_store(base, span->prevspan, (sb_span *) NULL); new_nextspan = relptr_access(base, heap->spans[SB_FULLNESS_CLASSES - 2]); - relptr_store(base, new_nextspan->prevspan, span); - relptr_copy(heap->spans[SB_FULLNESS_CLASSES - 2], - new_nextspan->prevspan); + if (new_nextspan != NULL) + relptr_store(base, new_nextspan->prevspan, span); + relptr_store(base, heap->spans[SB_FULLNESS_CLASSES - 2], span); } else if (span->nallocatable == span->nmax) {