Skip to content

Commit

Permalink
monitor: avoid NULL deref in monitor_service_shutdown()
Browse files Browse the repository at this point in the history
Resolves: #5598

Reviewed-by: Sumit Bose <sbose@redhat.com>
  • Loading branch information
alexey-tikhonov authored and pbrezina committed Apr 26, 2021
1 parent 29abf94 commit 38905ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/monitor/monitor.c
Expand Up @@ -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);
Expand Down

0 comments on commit 38905ca

Please sign in to comment.