Skip to content

Commit ae35aa4

Browse files
committed
Avoid segfault?
1 parent e6ae20e commit ae35aa4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/src/dataio.cxx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,7 @@ class BZip2Decoder : public Decoder<bz_stream, char> {
347347
stream_.avail_in = 0;
348348
stream_.next_in = nullptr;
349349
if (BZ2_bzDecompressInit(&stream_, 0, 0) != BZ_OK)
350-
log_fatal("Error initializing bzip2 decoder: %s",
351-
BZ2_bzerror(&stream_, &err));
350+
log_fatal("Error initializing bzip2 decoder");
352351
}
353352

354353
~BZip2Decoder() {
@@ -665,13 +664,11 @@ class BZip2Encoder : public Encoder<bz_stream, char> {
665664
public:
666665
BZip2Encoder(std::ostream &file, size_t size) : Encoder(file, size)
667666
{
668-
int err = 0;
669667
stream_.bzalloc = nullptr;
670668
stream_.bzfree = nullptr;
671669
stream_.opaque = nullptr;
672670
if (BZ2_bzCompressInit(&stream_, 9, 0, 0) != BZ_OK)
673-
log_fatal("Error initializing bzip2 encoder: %s",
674-
BZ2_bzerror(&stream_, &err));
671+
log_fatal("Error initializing bzip2 encoder");
675672
}
676673

677674
~BZip2Encoder() {

0 commit comments

Comments
 (0)