]> granicus.if.org Git - postgresql/commitdiff
Avoid a possible relcache leak in get_object_address_attribute.
authorRobert Haas <rhaas@postgresql.org>
Tue, 21 Jan 2014 15:02:37 +0000 (10:02 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 21 Jan 2014 15:02:37 +0000 (10:02 -0500)
There's no apparent way to trigger this, so I'm not going to worry
about back-patching it for now.  But it's still wrong.

Marti Raudsepp

src/backend/catalog/objectaddress.c

index 991c02abbf14c6895ec46bb97fa8f9810794c671..a6ec6aa04bdd952354d9d6c8b7115766fca4d341 100644 (file)
@@ -1024,6 +1024,7 @@ get_object_address_attribute(ObjectType objtype, List *objname,
                address.classId = RelationRelationId;
                address.objectId = InvalidOid;
                address.objectSubId = InvalidAttrNumber;
+               relation_close(relation, lockmode);
                return address;
        }