From 9f656212d512931d6869754c4101bc48cfcb2b33 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 17 Jun 2016 10:42:02 +0100 Subject: [PATCH] Fixed memory leak --- src/osgPlugins/shp/XBaseParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/shp/XBaseParser.cpp b/src/osgPlugins/shp/XBaseParser.cpp index b34380ab2..92d9053ee 100644 --- a/src/osgPlugins/shp/XBaseParser.cpp +++ b/src/osgPlugins/shp/XBaseParser.cpp @@ -149,7 +149,7 @@ bool XBaseParser::parse(int fd) std::vector::iterator it, end = _xBaseFieldDescriptorList.end(); for (Integer i = 0; i < _xBaseHeader._numRecord; ++i) { - if ((nbytes = ::read( fd, record, _xBaseHeader._recordLength)) <= 0) return false; + if ((nbytes = ::read( fd, record, _xBaseHeader._recordLength)) <= 0) return break; char * recordPtr = record; osgSim::ShapeAttributeList * shapeAttributeList = new osgSim::ShapeAttributeList;