mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-03 22:07:52 +02:00
Fix use-after-release issue with pg_identify_object_as_address()
Spotted by buildfarm member prion, with -DRELCACHE_FORCE_RELEASE.
Introduced in f7aab36
.
Discussion: https://postgr.es/m/2759018.1619577848@sss.pgh.pa.us
Backpatch-through: 9.6
This commit is contained in:
parent
5b717e13c9
commit
669f736666
@ -5035,7 +5035,7 @@ getObjectIdentityParts(const ObjectAddress *object,
|
|||||||
elog(ERROR, "cache lookup failed for event trigger %u",
|
elog(ERROR, "cache lookup failed for event trigger %u",
|
||||||
object->objectId);
|
object->objectId);
|
||||||
trigForm = (Form_pg_event_trigger) GETSTRUCT(tup);
|
trigForm = (Form_pg_event_trigger) GETSTRUCT(tup);
|
||||||
evtname = NameStr(trigForm->evtname);
|
evtname = pstrdup(NameStr(trigForm->evtname));
|
||||||
appendStringInfoString(&buffer, quote_identifier(evtname));
|
appendStringInfoString(&buffer, quote_identifier(evtname));
|
||||||
if (objname)
|
if (objname)
|
||||||
*objname = list_make1(evtname);
|
*objname = list_make1(evtname);
|
||||||
|
Loading…
Reference in New Issue
Block a user