]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix seg fault in btape fixes bug #2180
authorKern Sibbald <kern@sibbald.com>
Thu, 31 Dec 2015 10:40:02 +0000 (11:40 +0100)
committerKern Sibbald <kern@sibbald.com>
Thu, 31 Dec 2015 10:40:02 +0000 (11:40 +0100)
bacula/src/stored/block_util.c

index 38b9958846ec3e6f7a85e17d032576318d2bfc6a..11f3cf27ec00389fc8c17c15382630f8d6b7becb 100644 (file)
@@ -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);