summaryrefslogtreecommitdiffstats
path: root/src/monitor
diff options
context:
space:
mode:
authorPavel Reichl <pavel.reichl@redhat.com>2013-12-02 15:49:04 +0000
committerJakub Hrozek <jhrozek@redhat.com>2013-12-09 22:08:53 +0100
commit75275a04a36dba53a261e208d1ad44780c2a5702 (patch)
tree4808752e02dfbabccf4a801d9d06e11a199e3bb2 /src/monitor
parente5502b7652b5c974bc44227f46693d3a43f69b8b (diff)
downloadsssd-75275a04a36dba53a261e208d1ad44780c2a5702.tar.gz
sssd-75275a04a36dba53a261e208d1ad44780c2a5702.tar.xz
sssd-75275a04a36dba53a261e208d1ad44780c2a5702.zip
monitor: memory-leak bug
In case *mt_svc_restart* event can't be created free *svc* directly.
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 4c0c22ce9..a99cdfe87 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -2626,9 +2626,11 @@ static void mt_svc_exit_handler(int pid, int wait_status, void *pvt)
tv = tevent_timeval_current_ofs(restart_delay, 0);
te = tevent_add_timer(svc->mt_ctx->ev, svc, tv, mt_svc_restart, svc);
- if (!te) {
+ if (te == NULL) {
/* Nothing much we can do */
- DEBUG(SSSDBG_CRIT_FAILURE, ("Out of memory?!\n"));
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Failed to allocate timed event: mt_svc_restart.\n"));
+ talloc_free(svc);
return;
}
}