pgsql: Revert the behavior of inet/cidr functions to not unpack the arg - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Revert the behavior of inet/cidr functions to not unpack the arg
Date
Msg-id E1Ra1GF-0004dz-7M@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Revert the behavior of inet/cidr functions to not unpack the arguments.

I forgot to change the functions to use the PG_GETARG_INET_PP() macro,
when I changed DatumGetInetP() to unpack the datum, like Datum*P macros
usually do. Also, I screwed up the definition of the PG_GETARG_INET_PP()
macro, and didn't notice because it wasn't used.

This fixes the memory leak when sorting inet values, as reported
by Jochen Erwied and debugged by Andres Freund. Backpatch to 8.3, like
the previous patch that broke it.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/81f4e6cd27d538bc27e9714a9173e4df353a02e5

Modified Files
--------------
src/backend/utils/adt/network.c |   98 +++++++++++++++++++-------------------
src/include/utils/inet.h        |    2 +-
2 files changed, 50 insertions(+), 50 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg