summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-05-01 23:19:43 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-05-01 23:19:43 +1000
commitbd22c1ca588147dd522542fcc39ba8b3f5c3b16c (patch)
tree4beb4b9163e34ebc4dbd52eb4110b58bcc07aa69 /sal
parent68bfb2a082cc8def86d9706f3328d39d585eecfb (diff)
coverity#1209781 Resource leak
We should free pTV_modify when we're done with it. Change-Id: I7eaf64df2f7bdf6bd899d3a31cad499c4066c990
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/file/osl_File.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 8888261cf30a..5e5093b2ea18 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -1860,7 +1860,7 @@ namespace osl_FileStatus
CPPUNIT_ASSERT( nError == FileBase::E_None );
//get modify time
- TimeValue *pTV_modify = NULL;
+ TimeValue* pTV_modify = NULL;
CPPUNIT_ASSERT( ( pTV_modify = ( TimeValue* )malloc( sizeof( TimeValue ) ) ) != NULL );
*pTV_modify = rFileStatus.getModifyTime();
@@ -1868,6 +1868,7 @@ namespace osl_FileStatus
//delete file
deleteTestFile( aTypeURL );
free( pTV_current );
+ free( pTV_modify );
CPPUNIT_ASSERT_MESSAGE( "test for getModifyTime function: This test turns out that UNX pricision is no more than 1 sec, don't know how to improve this function. ",
bOK );