From b97e86da413295b7ff9f3214af638bb2fd6f3c40 Mon Sep 17 00:00:00 2001 From: elpaso Date: Tue, 23 Feb 2016 10:47:12 +0100 Subject: [PATCH] [server] Safety measure to prevent potential leaks --- src/server/qgshttprequesthandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/qgshttprequesthandler.cpp b/src/server/qgshttprequesthandler.cpp index 0e34752e8d45..0a8e9656ed8f 100644 --- a/src/server/qgshttprequesthandler.cpp +++ b/src/server/qgshttprequesthandler.cpp @@ -456,6 +456,8 @@ void QgsHttpRequestHandler::setGetFeatureInfoResponse( const QDomDocument& infoD void QgsHttpRequestHandler::setServiceException( QgsMapServiceException ex ) { + // Safety measure to avoid potential leaks if called repeatedly + delete mException; mException = new QgsMapServiceException( ex ); //create Exception DOM document QDomDocument exceptionDoc;