diff options
author | Sree Harsha Totakura <sreeharsha@totakura.in> | 2015-04-29 11:37:01 +0200 |
---|---|---|
committer | Sree Harsha Totakura <sreeharsha@totakura.in> | 2015-04-29 11:37:01 +0200 |
commit | 211cd3cdb7e132b5be859cb4ad4f9f46b58c7b68 (patch) | |
tree | 4872df01b51a9925eefc32159955c8f8ae53bd23 /src/pq/db_pq.c | |
parent | 7a12aea7af5185457300314bd24bc13846051234 (diff) | |
download | exchange-211cd3cdb7e132b5be859cb4ad4f9f46b58c7b68.tar.xz |
libpq: do not loose the ptr where new memory should be allocated.
Diffstat (limited to 'src/pq/db_pq.c')
-rw-r--r-- | src/pq/db_pq.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, |