diff options
| author | 2011-02-21 22:57:05 +0000 | |
|---|---|---|
| committer | 2011-02-21 22:57:05 +0000 | |
| commit | 6dba5effd373a6342d5303326d1d08b72e88d5a7 (patch) | |
| tree | 4602aee6a520be0c7fe0c88b882b689f85428eb8 /src/modules/objects/KvsObject_file.cpp | |
| parent | Fix a memory leak in () (diff) | |
| download | KVIrc-6dba5effd373a6342d5303326d1d08b72e88d5a7.tar.gz KVIrc-6dba5effd373a6342d5303326d1d08b72e88d5a7.tar.bz2 KVIrc-6dba5effd373a6342d5303326d1d08b72e88d5a7.zip | |
Fix more memory leaks around
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5496 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects/KvsObject_file.cpp')
| -rw-r--r-- | src/modules/objects/KvsObject_file.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/objects/KvsObject_file.cpp b/src/modules/objects/KvsObject_file.cpp index 909b1c552..947ebda4b 100644 --- a/src/modules/objects/KvsObject_file.cpp +++ b/src/modules/objects/KvsObject_file.cpp @@ -386,7 +386,8 @@ KVSO_CLASS_FUNCTION(file,readBlock) KVSO_PARAMETER("length",KVS_PT_UNSIGNEDINTEGER,0,uLen) KVSO_PARAMETER("hobject",KVS_PT_HOBJECT,KVS_PF_OPTIONAL,hObject) KVSO_PARAMETERS_END(c) - if (uLen>(kvs_uint_t)m_pFile->size()) uLen=m_pFile->size(); + if (uLen>(kvs_uint_t)m_pFile->size()) + uLen=m_pFile->size(); if (hObject) { pObject=KviKvsKernel::instance()->objectController()->lookupObject(hObject); @@ -411,6 +412,7 @@ KVSO_CLASS_FUNCTION(file,readBlock) int rlen = m_pFile->read(buff, uLen); buff[rlen] = '\0'; QString szBlock(buff); + delete buff; c->returnValue()->setString(szBlock); } return true; |
