aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-04-28 20:26:18 +0000
committerChristian Grothoff <christian@grothoff.org>2011-04-28 20:26:18 +0000
commit81b94ec02de91fbdc1bcf31ae64e89f907d77227 (patch)
tree01d2c3e967efd4af827c1b2081b33227d035f778 /src
parent8948134338e19574b59b05ff2a006d7f62e6b74e (diff)
downloadgnunet-81b94ec02de91fbdc1bcf31ae64e89f907d77227.tar.gz
gnunet-81b94ec02de91fbdc1bcf31ae64e89f907d77227.zip
fixing leak
Diffstat (limited to 'src')
-rw-r--r--src/fs/gnunet-service-fs_lc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index 15dd4897a..11b26c452 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -263,13 +263,17 @@ client_response_handler (void *cls,
263 GNUNET_assert (pr == cr->pr); 263 GNUNET_assert (pr == cr->pr);
264 lc = cr->lc; 264 lc = cr->lc;
265 msize = sizeof (struct PutMessage) + data_len; 265 msize = sizeof (struct PutMessage) + data_len;
266 pm = GNUNET_malloc (msize); 266 {
267 pm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT); 267 char buf[msize];
268 pm->header.size = htons (msize); 268
269 pm->type = htonl (type); 269 pm = (struct PutMessage*) buf;
270 pm->expiration = GNUNET_TIME_absolute_hton (expiration); 270 pm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT);
271 memcpy (&pm[1], data, data_len); 271 pm->header.size = htons (msize);
272 GSF_local_client_transmit_ (lc, &pm->header); 272 pm->type = htonl (type);
273 pm->expiration = GNUNET_TIME_absolute_hton (expiration);
274 memcpy (&pm[1], data, data_len);
275 GSF_local_client_transmit_ (lc, &pm->header);
276 }
273#if DEBUG_FS 277#if DEBUG_FS
274 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 278 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
275 "Queued reply to query `%s' for local client\n", 279 "Queued reply to query `%s' for local client\n",