From b6e414b10b3ae7b28ad16da2027106ec59a99a0a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sun, 12 Aug 2018 12:58:39 -0400 Subject: Remove some extraneous null pointer checks (fixes #234) There were a few places in the code that were checking that a pointer wasn't null before deleting it, even though C++ has always allowed delete 0. Most of the code did not perform these checks. --- libqpdf/Pl_Flate.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libqpdf/Pl_Flate.cc') diff --git a/libqpdf/Pl_Flate.cc b/libqpdf/Pl_Flate.cc index 3becc135..4cd48046 100644 --- a/libqpdf/Pl_Flate.cc +++ b/libqpdf/Pl_Flate.cc @@ -31,11 +31,8 @@ Pl_Flate::Pl_Flate(char const* identifier, Pipeline* next, Pl_Flate::~Pl_Flate() { - if (this->outbuf) - { - delete [] this->outbuf; - this->outbuf = 0; - } + delete [] this->outbuf; + this->outbuf = 0; if (this->initialized) { -- cgit v1.2.3-54-g00ecf