From e54682b711def6107f2dd64d8fee4767b6d313ea Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 20:08:01 +0000 Subject: Apply patch bz1836146-covscan-fixes.patch patch_name: bz1836146-covscan-fixes.patch present_in_specfile: true --- diff --git a/include/tlist.h b/include/tlist.h index bcae55d..723d3ec 100644 --- a/include/tlist.h +++ b/include/tlist.h @@ -191,7 +191,7 @@ static inline void timerlist_expire(struct timerlist *timerlist) uint64_t current_time; current_monotonic_time = qb_util_nano_current_get(); - current_time_from_epoch = current_time = qb_util_nano_from_epoch_get(); + current_time_from_epoch = qb_util_nano_from_epoch_get(); qb_list_for_each_safe(pos, next, &timerlist->timer_head) { diff --git a/lib/ringbuffer.c b/lib/ringbuffer.c index f85ad97..ef761fd 100644 --- a/lib/ringbuffer.c +++ b/lib/ringbuffer.c @@ -266,7 +266,7 @@ cleanup_hdr: if (fd_hdr >= 0) { close(fd_hdr); } - if (rb && (flags & QB_RB_FLAG_CREATE)) { + if (rb && (rb->shared_hdr != MAP_FAILED) && (flags & QB_RB_FLAG_CREATE)) { unlink(rb->shared_hdr->hdr_path); if (rb->notifier.destroy_fn) { (void)rb->notifier.destroy_fn(rb->notifier.instance);