this just saves the user from doing this.
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
lib/ringbuffer.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/ringbuffer.c b/lib/ringbuffer.c
index 2fa44b3..bc57a7d 100644
--- a/lib/ringbuffer.c
+++ b/lib/ringbuffer.c
@@ -198,6 +198,9 @@ cleanup_hdr:
void qb_rb_close(qb_ringbuffer_t * rb)
{
+ if (rb == NULL) {
+ return;
+ }
qb_util_log(LOG_DEBUG,
"Destroying ringbuffer: %s",
rb->shared_hdr->hdr_path);
--
1.7.3.1