diff -rupN --no-dereference libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/include/liblas/liblas.hpp libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp --- libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8/include/liblas/liblas.hpp 2020-04-05 18:40:29.000000000 +0200 +++ libLAS-d76a061f33a69a36ab116cd939c5d444b301efd8-new/include/liblas/liblas.hpp 2020-06-08 11:37:26.906014997 +0200 @@ -137,7 +137,10 @@ inline std::istream* Open(std::string co { ifs = new std::ifstream(); ifs->open(filename.c_str(), mode); - if (ifs->is_open() == false) return NULL; + if (ifs->is_open() == false) { + delete ifs; + return NULL; + } return ifs; } catch (...)