From e15d4d9c0541b4952341f521ec2598fa4cb05bb1 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 21 Jan 2017 15:50:17 +0200 Subject: [PATCH] Fix possible memory leak. --HG-- branch : feature --- src/app/tape/tmainwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index e0be0b916..d6e4f6e63 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -1258,10 +1258,9 @@ void TMainWindow::ImportFromPattern() converter.Convert(); VDomDocument::ValidateXML(VPatternConverter::CurrentSchema, mPath); - VLitePattern *doc = new VLitePattern(); + QScopedPointer doc(new VLitePattern()); doc->setXMLContent(mPath); measurements = doc->ListMeasurements(); - delete doc; // close a pattern } catch (VException &e) {