projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5853948
)
Fix a bug.
author
Robert Haas
<rhaas@postgresql.org>
Tue, 29 Apr 2014 15:31:41 +0000
(11:31 -0400)
committer
Robert Haas
<rhaas@postgresql.org>
Tue, 29 Apr 2014 15:31:41 +0000
(11:31 -0400)
src/backend/utils/mmgr/sb_alloc.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/mmgr/sb_alloc.c
b/src/backend/utils/mmgr/sb_alloc.c
index 7b983a4d665680550d7c2cef82631080ca489b1a..d8923fdca8b955e58153ac4f563de5f3896701f0 100644
(file)
--- 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->prev
span);
+ 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)
{