Bug 443722 - kadslwatch-01.00.06-245.19: 4 * call to wrong C++ delete
Summary: kadslwatch-01.00.06-245.19: 4 * call to wrong C++ delete
Status: RESOLVED DUPLICATE of bug 442933
Alias: None
Product: openSUSE 11.1
Classification: openSUSE
Component: KDE4 Applications (show other bugs)
Version: Factory
Hardware: All openSUSE 11.0
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 12:29 UTC by David Binderman
Modified: 2008-11-11 12:53 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2008-11-11 12:29:26 UTC
I just checked some of the source code in the Suse Linux factory package
kadslwatch-01.00.06-245.19 and I noticed the following

$ egrep "new|delete" ../BUILD/kadslwatch-01.00.06/src/ccapiinfo.cpp
                _cbyte* pBuffer = new _cbyte[64];
                delete pBuffer;
                _cbyte* pBuffer = new _cbyte[8];
                delete pBuffer;
                m_pManuData = new unsigned char[GetManuDataSize ()];
                if ( m_pManuData != NULL ) delete m_pManuData;
                                _cbyte* pBuffer = new _cbyte[64];
                delete pBuffer;

Lines two, four, six and eight look wrong. Suggest code rework.
Suggest new code

  delete [] pBuffer; pBuffer = NULL;
Comment 1 Lubos Lunak 2008-11-11 12:53:49 UTC

*** This bug has been marked as a duplicate of bug 442933 ***