From 211cd3cdb7e132b5be859cb4ad4f9f46b58c7b68 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 29 Apr 2015 11:37:01 +0200 Subject: [PATCH] libpq: do not loose the ptr where new memory should be allocated. --- src/pq/db_pq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pq/db_pq.c b/src/pq/db_pq.c index f0412d49f..57bf172b5 100644 --- a/src/pq/db_pq.c +++ b/src/pq/db_pq.c @@ -145,7 +145,8 @@ TALER_PQ_extract_result (PGresult *result, if (NULL != rs[i].result_size) *rs[i].result_size = len; rs[i].dst_size = len; - rs[i].dst = GNUNET_malloc (len); + *((void **) rs[i].dst) = GNUNET_malloc (len); + rs[i].dst = * ((void **) rs[i].dst); } memcpy (rs[i].dst, res,