pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Helmar Spangenberg <hspangenberg@frey.de>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5769: Problem with SPI_getvalue
Date: Thu, 25 Nov 2010 17:11:03 +0200
Message-ID: <4CEE7C87.50909@enterprisedb.com> (raw)
In-Reply-To: <201011251145.oAPBjweK020676@wwwmaster.postgresql.org>
References: <201011251145.oAPBjweK020676@wwwmaster.postgresql.org>

On 25.11.2010 13:45, Helmar Spangenberg wrote:
> Bug reference:      5769
> Logged by:          Helmar Spangenberg
> Email address:      hspangenberg@frey.de
> PostgreSQL version: 9.0.1
> Operating system:   Linux
> Description:        Problem with SPI_getvalue
> Details:
>
> Referring to the manual, I can pfree the result returned by SPI_getvalue.
> However the backend crashes as soon as I use pfree.
>
> No example uses pfree. Could it be possible, there is a bug in the
> documentation?

The return value of SPI_getvalue is certainly palloc()'d, so pfree()ing 
it should not crash. Perhaps you are trying to pfree() it after the 
whole memory context has already been destroyed. Or perhaps SPI_getvalue 
returned a NULL and you're trying to pfree() that. Can't say without 
more details.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (4+ messages)  latest in thread

Message-ID: <4CEE7C87.50909@enterprisedb.com>
Permalink:  ../4CEE7C87.50909@enterprisedb.com/
Also on:    postgresql.org/message-id/4CEE7C87.50909@enterprisedb.com

 · 

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-bugs@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, hspangenberg@frey.de
  Subject: Re: BUG #5769: Problem with SPI_getvalue
  In-Reply-To: <4CEE7C87.50909@enterprisedb.com>
  References: <201011251145.oAPBjweK020676@wwwmaster.postgresql.org> <4CEE7C87.50909@enterprisedb.com>

* 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