From: Pavan Deolasee Date: Thu, 14 Apr 2016 09:00:05 +0000 (+0530) Subject: Fix another memory leak in executor. X-Git-Tag: XL9_5_R1~3 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=7c1e120d289ee7198bd31f262b0ebea00333b199;p=postgres-xl.git Fix another memory leak in executor. --- diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 0354bb2989..ff3b25e32f 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -1325,6 +1325,10 @@ slot_deform_datarow(TupleTableSlot *slot) } data = MemoryContextAlloc(slot->tts_drowcxt, data_length); memcpy(data, val, data_length); + + if (slot->tts_values[i]) + pfree(slot->tts_values[i]); + slot->tts_values[i] = (Datum) data; } }