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/>
http://bugzilla.novell.com/show_bug.cgi?id=532767


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/targaIO.cc
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;

and


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: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
This Thread
  • No further messages