[gupnp/wip/phako/reusable-service-action: 43/49] ServiceProxy: Prevent possible null pointer deref
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp/wip/phako/reusable-service-action: 43/49] ServiceProxy: Prevent possible null pointer deref
- Date: Sat, 3 Jul 2021 16:48:11 +0000 (UTC)
commit 1352be0e0bcb6d901011a78468f63c0d2f26f98b
Author: Jens Georg <mail jensge org>
Date: Sat May 29 01:38:46 2021 +0200
ServiceProxy: Prevent possible null pointer deref
If Proxy went down while soup message is still running, the weak
reference will have nulled the pointer
libgupnp/gupnp-service-proxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]