From 60414fa60ff14861d2d99283fec5ba59f6749df1 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Thu, 14 Jan 2021 13:56:29 +0100 Subject: [PATCH] Revert "Qt: fix memleak in DecodeAsDelegate." This reverts commit dd13766fb9ed1dfbf4058f822ff42eb091db7109. --- ui/qt/models/decode_as_delegate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/qt/models/decode_as_delegate.cpp b/ui/qt/models/decode_as_delegate.cpp index 476ab43583..c2c5dc461b 100644 --- a/ui/qt/models/decode_as_delegate.cpp +++ b/ui/qt/models/decode_as_delegate.cpp @@ -125,7 +125,7 @@ void DecodeAsDelegate::decodeAddProtocol(const gchar *, const gchar *proto_name, if (!proto_list) return; - dissector_info_t *dissector_info = new dissector_info_t(); + dissector_info_t *dissector_info = new dissector_info_t(); dissector_info->proto_name = proto_name; dissector_info->dissector_handle = (dissector_handle_t) value; @@ -274,7 +274,6 @@ QWidget* DecodeAsDelegate::createEditor(QWidget *parentWidget, const QStyleOptio for (protocol = protocols.begin(); protocol != protocols.end(); ++protocol) { cb_editor->addItem(protocol.key(), VariantPointer::asQVariant(protocol.value())); - delete *protocol; } //Make sure the combo box is at least as wide as the column