Plug memory leak in index_get_partition The list of indexes was being leaked when asked for an index that doesn't have an index partition in the table partition. Not a common case admittedly --and in most cases where it occurs, caller throws an error anyway-- but worth fixing for cleanliness and in case any third-party code is calling this function.
While at it, remove use of lfirst_oid() to obtain a value we already have. Author: Justin Pryzby <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/8ad6a0c1bb1c5a041cadfed713ef6bcabd0955ab Modified Files -------------- src/backend/catalog/partition.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
