summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_parsing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-09 22:29:10 +0200
committerChristian Grothoff <christian@grothoff.org>2015-07-09 22:29:10 +0200
commit1e7bef9762644445fd34a554488711b3881c699a (patch)
treeb42b24f4888e680b349c3ead2f2e208892fb4ed4 /src/mint/taler-mint-httpd_parsing.c
parentbe535b68e1c5911c9ec011a0d24714d0f4b42377 (diff)
downloadexchange-1e7bef9762644445fd34a554488711b3881c699a.tar.gz
exchange-1e7bef9762644445fd34a554488711b3881c699a.tar.bz2
exchange-1e7bef9762644445fd34a554488711b3881c699a.zip
-fix leaks
Diffstat (limited to 'src/mint/taler-mint-httpd_parsing.c')
-rw-r--r--src/mint/taler-mint-httpd_parsing.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.c b/src/mint/taler-mint-httpd_parsing.c
index 0f31e8652..9e7287f2b 100644
--- a/src/mint/taler-mint-httpd_parsing.c
+++ b/src/mint/taler-mint-httpd_parsing.c
@@ -29,13 +29,12 @@
/**
- * Initial size for POST
- * request buffer.
+ * Initial size for POST request buffer.
*/
-#define REQUEST_BUFFER_INITIAL 1024
+#define REQUEST_BUFFER_INITIAL (2*1024)
/**
- * Maximum POST request size
+ * Maximum POST request size.
*/
#define REQUEST_BUFFER_MAX (1024*1024)
@@ -131,6 +130,7 @@ buffer_append (struct Buffer *buf,
return GNUNET_NO;
new_buf = GNUNET_malloc (new_size);
memcpy (new_buf, buf->data, buf->fill);
+ GNUNET_free (buf->data);
buf->data = new_buf;
buf->alloc = new_size;
}
@@ -273,7 +273,6 @@ TMH_PARSE_post_json (struct MHD_Connection *connection,
? GNUNET_SYSERR : GNUNET_NO;
}
/* everything OK, wait for more POST data */
- fprintf (stderr, "Init %p\n", r);
*upload_data_size = 0;
*con_cls = r;
return GNUNET_YES;
@@ -315,8 +314,6 @@ TMH_PARSE_post_json (struct MHD_Connection *connection,
TMH_RESPONSE_reply_invalid_json (connection))
? GNUNET_NO : GNUNET_SYSERR;
}
- fprintf (stderr, "Deinit %p\n", r);
-
buffer_deinit (r);
GNUNET_free (r);
*con_cls = NULL;