pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@postgresql.org
Subject: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg
Date: Mon, 12 Dec 2011 08:29:23 +0000
Message-ID: <E1Ra1GF-0004dz-7M@gemulon.postgresql.org> (raw)

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(-)



view thread (11+ messages)  latest in thread

Message-ID: <E1Ra1GF-0004dz-7M@gemulon.postgresql.org>
Permalink:  ../E1Ra1GF-0004dz-7M@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1Ra1GF-0004dz-7M@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Revert the behavior of inet/cidr functions to not unpack the arg
  In-Reply-To: <E1Ra1GF-0004dz-7M@gemulon.postgresql.org>
  References: <E1Ra1GF-0004dz-7M@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox