diff options
| author | Patrick Griffis <pgriffis@igalia.com> | 2020-11-25 15:06:31 -0600 |
|---|---|---|
| committer | Patrick Griffis <pgriffis@igalia.com> | 2020-11-25 15:06:31 -0600 |
| commit | 3fed5ec1d9baa4c2c072193304f8401a6962b7be (patch) | |
| tree | b6ca9d9b94981e58818eae10f841e41764d3510a | |
| parent | 51ccd33d005549188f667cbfa2963b8257cc11a2 (diff) | |
| download | libsoup-3fed5ec1d9baa4c2c072193304f8401a6962b7be.tar.gz | |
forms-test: Fix leak
| -rw-r--r-- | tests/forms-test.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |
