URL: https://github.com/SSSD/sssd/pull/5599 Author: alexey-tikhonov Title: #5599: monitor: avoid NULL deref in monitor_service_shutdown() Action: opened
PR body: """ Resolves: https://github.com/SSSD/sssd/issues/5598 """ 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 d27e3d07dd0d18a6cc9001facc99a0e18dcceb8b Mon Sep 17 00:00:00 2001 From: Alexey Tikhonov <[email protected]> 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..fe5c088c91 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->num_services) ctx->num_services--; DEBUG(SSSDBG_TRACE_FUNC, "Unregistering service %s (%p)\n", svc->identity, svc);
_______________________________________________ sssd-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected] Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
