summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-01-05 16:51:04 +0100
committerJens Georg <mail@jensge.org>2022-01-05 16:51:46 +0100
commita1fd8a212f340ad7a7833ef9005d8060ae92b4bd (patch)
treebf779ae0ebacd4a4db46942c5b5f6e68c175e82a
parent77b2eee627c7eb19316deebaa54513ca89497e2e (diff)
downloadgupnp-a1fd8a212f340ad7a7833ef9005d8060ae92b4bd.tar.gz
ServiceProxy: Do not leak response on resend
Free the bytes from the previous try before re-sending the messag with M-POST
-rw-r--r--libgupnp/gupnp-service-proxy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 62ad0e4..ea672e9 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -756,6 +756,7 @@ action_task_got_response (GObject *source,
"POST")) {
g_debug ("POST returned with METHOD_NOT_ALLOWED, "
"trying with M-POST");
+ g_bytes_unref (action->response);
if (!prepare_action_msg (action->proxy,
action,
"M-POST",
@@ -2294,6 +2295,8 @@ gupnp_service_proxy_call_action (GUPnPServiceProxy *proxy,
action,
"M-POST",
&internal_error)) {
+ g_bytes_unref (action->response);
+
action->response =
soup_session_send_and_read (session,
action->msg,