Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a928297

Browse files
committed
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
1 parent f3c4537 commit a928297

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5092,7 +5092,7 @@ getObjectIdentityParts(const ObjectAddress *object,
50925092
elog(ERROR, "cache lookup failed for event trigger %u",
50935093
object->objectId);
50945094
trigForm = (Form_pg_event_trigger) GETSTRUCT(tup);
5095-
evtname = NameStr(trigForm->evtname);
5095+
evtname = pstrdup(NameStr(trigForm->evtname));
50965096
appendStringInfoString(&buffer, quote_identifier(evtname));
50975097
if (objname)
50985098
*objname = list_make1(evtname);

0 commit comments

Comments
 (0)