[gupnp] ServiceProxy: Do not leak response on resend
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] ServiceProxy: Do not leak response on resend
- Date: Wed, 5 Jan 2022 15:55:42 +0000 (UTC)
commit a1fd8a212f340ad7a7833ef9005d8060ae92b4bd
Author: Jens Georg <mail jensge org>
Date: Wed Jan 5 16:51:04 2022 +0100
ServiceProxy: Do not leak response on resend
Free the bytes from the previous try before re-sending the messag with
M-POST
libgupnp/gupnp-service-proxy.c | 3 +++
1 file changed, 3 insertions(+)
---
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]