Mailinglist Archive: opensuse-bugs (6605 mails)

< Previous Next >
[Bug 532767] New: yafray-0.0.9-88.5: 2 * bad call to delete
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Thu, 20 Aug 2009 04:13:49 -0600
  • Message-id: <bug-532767-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>

Summary: yafray-0.0.9-88.5: 2 * bad call to delete
Classification: openSUSE
Product: openSUSE 11.2
Version: Factory
Platform: All
OS/Version: openSUSE 11.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Other
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: dcb314@xxxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---

I just had a look at factory package yafray-0.0.9-88.5

For source code file yafray/src/yafraycore/
around line 150 is the source code for the
member function targaImg_t::Load.

I notice the following line of code

cBuffer_t* imgdata = new cBuffer_t(width, height);

but also

delete[] imgdata;


delete[] imgdata; imgdata=NULL;

These lines of code don't match up. The new allocates *one* variable
of type cBuffer_t and the two delete lines delete an *array* of variables.

Suggest new code

delete imgdata; imgdata = NULL;

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
This Thread
  • No further messages