[Libreoffice-commits] core.git: sal/rtl

Caolán McNamara caolanm at redhat.com
Mon Mar 31 06:35:47 PDT 2014


 sal/rtl/strtmpl.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 53851801c62185541ccbee4421f9327b225771a2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 31 14:33:26 2014 +0100

    coverity#983373 Dereference before null check
    
    Change-Id: Ie2a6b5e71f76ff2900ff078fcc098e66927458ef

diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index 9576096..c3d42c4 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -1364,9 +1364,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( ensureCapacity )( IMPL_RTL_STRINGDATA** ppThi
     *ppThis = pTempStr;
     RTL_LOG_STRING_NEW( *ppThis );
 
-    /* must be done last, if pStr == *ppThis */
-    if ( pOrg )
-        IMPL_RTL_STRINGNAME( release )( pOrg );
+    IMPL_RTL_STRINGNAME( release )( pOrg );
 }
 
 /* ----------------------------------------------------------------------- */


More information about the Libreoffice-commits mailing list