[Libreoffice-commits] core.git: sc/source

Caolán McNamara caolanm at redhat.com
Sat Jun 10 14:27:53 UTC 2017


 sc/source/ui/docshell/dataprovider.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7ceb90d059e62a832f4f8db10c05a5e175ebaee8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jun 10 14:42:57 2017 +0100

    coverity#1397206 Resource leak
    
    Change-Id: I66f912cfc88a0122c6c23f149040277b738d9d78
    Reviewed-on: https://gerrit.libreoffice.org/38636
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/docshell/dataprovider.cxx b/sc/source/ui/docshell/dataprovider.cxx
index ebdbe73cc5ee..a6c4d69c9b91 100644
--- a/sc/source/ui/docshell/dataprovider.cxx
+++ b/sc/source/ui/docshell/dataprovider.cxx
@@ -173,9 +173,9 @@ void CSVFetchThread::execute()
     mpStream = FetchStreamFromURL(maURL, aBuffer);
     if (mpStream->good())
     {
-        LinesType* pLines = new LinesType(10);
+        LinesType aLines(10);
         SCROW nCurRow = 0;
-        for (Line & rLine : *pLines)
+        for (Line & rLine : aLines)
         {
             rLine.maCells.clear();
             mpStream->ReadLine(rLine.maLine);


More information about the Libreoffice-commits mailing list