obsproject/obs-studio

obs-studio-32.0.0-sources/plugins/decklink/OBSVideoFrame.cpp:15:2: error: Mismatching allocation and deallocation

Closed this issue · 1 comments

Operating System Info

Other

Other OS

fedora linux

OBS Studio Version

Other

OBS Studio Version (Other)

32.0.0 release

OBS Studio Log URL

Some random text.

OBS Studio Crash Log URL

No response

Expected Behavior

Static analyser cppcheck says:

obs-studio-32.0.0-sources/plugins/decklink/OBSVideoFrame.cpp:15:2: error: Mismatching allocation and deallocation: OBSVideoFrame::data [mismatchAllocDealloc]

Source code is

this->data = new unsigned char[width * height * bpp + 1];
this->pixelFormat = pixelFormat;

}

OBSVideoFrame::~OBSVideoFrame()
{
delete this->data;
}

Beginners error. Use delete [] with new [].

Current Behavior

Filler text.

Steps to Reproduce

...

Anything else we should know?

No response

There's no need to open bug reports for static analysis findings, especially when the bug report is low effort like this one, see the "filler text" and "Some random text" and the empty Steps to Reproduce. Additionally, stuff like "Beginners error." is just rude. If these are actual problems, please submit a Pull Request fixing them instead.