[SSSD] [PATCH] Guard against segfault in ping_check()
Jakub Hrozek
jhrozek at redhat.com
Tue Dec 13 15:01:23 UTC 2011
https://fedorahosted.org/sssd/ticket/1090
Unfortunately there is not enough info in rhbz #754114 where the bug
originated, so just band-aid the crash for now.
-------------- next part --------------
From 0d16a1cc902b3fcb32636fae5d238385735fb453 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Tue, 13 Dec 2011 15:41:09 +0100
Subject: [PATCH] Guard against segfault in ping_check()
https://fedorahosted.org/sssd/ticket/1090
---
src/monitor/monitor.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index a0a0cc2f7a153b2b61cfb2a26939f310d5f5d704..5d30643748441c8476b76850f1653bb8be52fe12 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -2204,6 +2204,12 @@ static void ping_check(DBusPendingCall *pending, void *data)
int type;
svc = talloc_get_type(data, struct mt_svc);
+ if (!svc) {
+ /* The connection probably went down before the callback fired.
+ * Not much we can do. */
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Invalid service pointer.\n"));
+ return;
+ }
reply = dbus_pending_call_steal_reply(pending);
if (!reply) {
--
1.7.7.4
More information about the sssd-devel
mailing list