From 7d039a2e0b07daec906d67012030ac4f427fd303 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 11 May 2018 10:47:21 -0700 Subject: [PATCH] Fix potential memory leak See #15991 --- src/richtext/richtextbuffer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index e18b39c433..70d37ef6d5 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -8317,6 +8317,8 @@ bool wxRichTextBuffer::SubmitAction(wxRichTextAction* action) { GetCommandProcessor()->Store(cmd); // Just store it, without Do()ing anything } + else + delete cmd; } return true;