From 1ba7b68e7e398a2256feb39d42be9ebe2c4e1653 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Wed, 25 Sep 2024 08:57:09 +0200 Subject: [PATCH] Fix potential memory leaks in neume editor [skip-ci] --- src/editortoolkit_neume.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/editortoolkit_neume.cpp b/src/editortoolkit_neume.cpp index 11b5ea9a0a..08e110a978 100644 --- a/src/editortoolkit_neume.cpp +++ b/src/editortoolkit_neume.cpp @@ -1147,6 +1147,7 @@ bool EditorToolkitNeume::Insert(std::string elementType, std::string staffId, in if (accidTypeW == ACCIDENTAL_WRITTEN_NONE) { LogError("A accid type must be specified."); delete accid; + delete zone; m_editInfo.import("status", "FAILURE"); m_editInfo.import("message", "A accid type must be specified."); @@ -1212,6 +1213,7 @@ bool EditorToolkitNeume::Insert(std::string elementType, std::string staffId, in if (divLineTypeW == divLineLog_FORM_NONE) { LogError("A divLine type must be specified."); delete divLine; + delete zone; m_editInfo.import("status", "FAILURE"); m_editInfo.import("message", "A divLine type must be specified.");