The timer handle have possibility in using by sub thread,
better to close it after sub process exit.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
if (!info)
return;
- if (info->periodic.timer_fd)
- close(info->periodic.timer_fd);
-
if (info->id > 0) {
pthread_cancel(info->id);
pthread_join(info->id, NULL);
}
+ if (info->periodic.timer_fd)
+ close(info->periodic.timer_fd);
+
if (info->postfn)
info->postfn(info->private_data);
}