summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2021-05-29 01:38:46 +0200
committerJens Georg <mail@jensge.org>2021-07-03 18:45:31 +0200
commit1352be0e0bcb6d901011a78468f63c0d2f26f98b (patch)
tree1a7f4904af2e0200bed06628f325650b7ae435b9
parent9a6534a445c122af938bd53251e8f64866f0abe6 (diff)
downloadgupnp-1352be0e0bcb6d901011a78468f63c0d2f26f98b.tar.gz
ServiceProxy: Prevent possible null pointer deref
If Proxy went down while soup message is still running, the weak reference will have nulled the pointer
-rw-r--r--libgupnp/gupnp-service-proxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 51d94b7..d7d18ac 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -605,7 +605,7 @@ on_action_cancelled (GCancellable *cancellable, gpointer user_data)
GUPnPContext *context;
SoupSession *session;
- if (action->msg != NULL) {
+ if (action->msg != NULL && action->proxy != NULL) {
context = gupnp_service_info_get_context
(GUPNP_SERVICE_INFO (action->proxy));
session = gupnp_context_get_session (context);