From b62f8adaac7147152225bac88032585c34e6f897 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 31 Dec 2015 11:40:02 +0100 Subject: [PATCH] Fix seg fault in btape fixes bug #2180 --- bacula/src/stored/block_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/stored/block_util.c b/bacula/src/stored/block_util.c index 38b9958846..11f3cf27ec 100644 --- a/bacula/src/stored/block_util.c +++ b/bacula/src/stored/block_util.c @@ -186,7 +186,7 @@ void DCR::free_blocks() */ void free_block(DEV_BLOCK *block) { - if (block) { + if (block && block->buf) { Dmsg1(999, "free_block buffer %x\n", block->buf); free_memory(block->buf); Dmsg1(999, "free_block block %x\n", block); -- 2.39.5