diff options
author | Jens Georg <mail@jensge.org> | 2021-05-19 19:42:59 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2021-05-19 19:44:20 +0200 |
commit | 0f59d903c9db01f7cbe6c2ebede0a570dd29f0f5 (patch) | |
tree | 907a076e2767f0b044d37a20416152aa7066ee17 | |
parent | 8a349541f10b774ac8128bfb0e25ddbb405e6033 (diff) | |
download | gupnp-0f59d903c9db01f7cbe6c2ebede0a570dd29f0f5.tar.gz |
service-action: Do not leak message if never sent
-rw-r--r-- | libgupnp/gupnp-service-proxy-action.c | 4 | ||||
-rw-r--r-- | libgupnp/gupnp-service-proxy.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libgupnp/gupnp-service-proxy-action.c b/libgupnp/gupnp-service-proxy-action.c index 2fd10d5..da41d91 100644 --- a/libgupnp/gupnp-service-proxy-action.c +++ b/libgupnp/gupnp-service-proxy-action.c @@ -230,6 +230,10 @@ action_dispose (GUPnPServiceProxyAction *action) g_clear_object (&action->cancellable); g_clear_error (&action->error); g_clear_object (&action->msg); + if (action->msg_str != NULL) { + g_string_free (action->msg_str, TRUE); + action->msg_str = NULL; + } g_free (action->name); } diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c index cec7c8a..0201638 100644 --- a/libgupnp/gupnp-service-proxy.c +++ b/libgupnp/gupnp-service-proxy.c @@ -724,6 +724,7 @@ prepare_action_msg (GUPnPServiceProxy *proxy, ret->msg_str->len); g_string_free (ret->msg_str, FALSE); + ret->msg_str = NULL; } static void |