[libsoup] forms-test: Fix leak
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] forms-test: Fix leak
- Date: Wed, 25 Nov 2020 21:25:52 +0000 (UTC)
commit 3fed5ec1d9baa4c2c072193304f8401a6962b7be
Author: Patrick Griffis <pgriffis igalia com>
Date: Wed Nov 25 15:06:31 2020 -0600
forms-test: Fix leak
tests/forms-test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/tests/forms-test.c b/tests/forms-test.c
index 8bc6a067..1c9af9ea 100644
--- a/tests/forms-test.c
+++ b/tests/forms-test.c
@@ -108,6 +108,7 @@ do_hello_test_libsoup (int n, gboolean extra, const char *uri)
SoupMessage *msg;
GData *data;
GBytes *body;
+ char *encoded;
debug_printf (1, "%2d. '%s' '%s'%s: ", n * 2 + (extra ? 2 : 1),
tests[n].title ? tests[n].title : "(null)",
@@ -124,9 +125,11 @@ do_hello_test_libsoup (int n, gboolean extra, const char *uri)
session = soup_test_session_new (NULL);
+ encoded = soup_form_encode_datalist (&data);
msg = soup_message_new_from_encoded_form ("GET",
uri,
- soup_form_encode_datalist (&data));
+ encoded);
+ g_free (encoded);
g_datalist_clear (&data);
body = soup_test_session_send (session, msg, NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]