Deskcalc: Fix 'new[]' array freed with 'delete'

fKeypad is allocated by new[] in _ParseCalcDesc(), but freed by delete.
Pointed out by LGTM.

Change-Id: Iac81d3cc6bfcf003ddf9146415a4400c34a1b7f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1879
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
This commit is contained in:
Murai Takashi 2019-09-21 16:00:34 +09:00 committed by Axel Dörfler
parent 7abf1b6fba
commit dfb3c928f8

View File

@ -201,7 +201,7 @@ CalcView::CalcView(BMessage* archive)
CalcView::~CalcView()
{
delete fKeypad;
delete[] fKeypad;
delete fOptions;
free(fKeypadDescription);
delete fEvaluateMessageRunner;