mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Fix _lo_commit: core if LO memmory context was not created (LO were not used?)
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.22 1998/07/21 04:17:23 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.23 1998/07/22 05:48:59 vadim Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This should be moved to a more appropriate place. It is here
|
* This should be moved to a more appropriate place. It is here
|
||||||
@@ -375,14 +375,18 @@ lo_export(Oid lobjId, text *filename)
|
|||||||
void
|
void
|
||||||
_lo_commit(void)
|
_lo_commit(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
MemoryContext currentContext;
|
MemoryContext currentContext;
|
||||||
|
|
||||||
|
if (fscxt == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
currentContext = MemoryContextSwitchTo((MemoryContext) fscxt);
|
currentContext = MemoryContextSwitchTo((MemoryContext) fscxt);
|
||||||
|
|
||||||
for (i = 0; i < MAX_LOBJ_FDS; i++) {
|
for (i = 0; i < MAX_LOBJ_FDS; i++)
|
||||||
if (cookies[i] != NULL) inv_cleanindex(cookies[i]);
|
{
|
||||||
}
|
if (cookies[i] != NULL) inv_cleanindex(cookies[i]);
|
||||||
|
}
|
||||||
|
|
||||||
MemoryContextSwitchTo(currentContext);
|
MemoryContextSwitchTo(currentContext);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user