URL: https://github.com/SSSD/sssd/pull/5599 Author: alexey-tikhonov Title: #5599: monitor: avoid NULL deref in monitor_service_shutdown() Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5599/head:pr5599 git checkout pr5599
From cc2f21acad5251a43d48c7fee2104e2dbc48a33b Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov <atikh...@redhat.com> Date: Thu, 22 Apr 2021 18:11:37 +0200 Subject: [PATCH] monitor: avoid NULL deref in monitor_service_shutdown() Resolves: https://github.com/SSSD/sssd/issues/5598 --- src/monitor/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 9073082c16..41601ec559 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2180,7 +2180,7 @@ static void monitor_service_shutdown(struct mt_svc *svc) /* We must decrease the number of services when shutting down * a {socket,dbus}-activated service. */ - ctx->num_services--; + if (ctx != NULL) ctx->num_services--; DEBUG(SSSDBG_TRACE_FUNC, "Unregistering service %s (%p)\n", svc->identity, svc);
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure