Skip to content

Commit

Permalink
Fix potential memory leaks in neume editor [skip-ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Sep 25, 2024
1 parent e37284d commit 1ba7b68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/editortoolkit_neume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down Expand Up @@ -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.");
Expand Down

0 comments on commit 1ba7b68

Please sign in to comment.