forked from osmocom/wireshark
Qt: Fix a memory leak in ByteViewTab
FieldInformation::parentField() allocated a new FieldInformation, so ensure to delete this when done. Change-Id: Id0f538cc696551ec47169103be823eb1e55d1777 Reviewed-on: https://code.wireshark.org/review/36823 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
parent
55920e64e5
commit
1f6449c05d
|
@ -302,10 +302,14 @@ void ByteViewTab::selectedFieldChanged(FieldInformation *selected)
|
|||
|
||||
setCurrentIndex(idx);
|
||||
|
||||
p_start = selected->parentField()->position().start;
|
||||
p_length = selected->parentField()->position().length;
|
||||
FieldInformation *parentField = selected->parentField();
|
||||
|
||||
p_start = parentField->position().start;
|
||||
p_length = parentField->position().length;
|
||||
fa_start = selected->appendix().start;
|
||||
fa_length = selected->appendix().length;
|
||||
|
||||
delete parentField;
|
||||
}
|
||||
|
||||
if (byte_view_text)
|
||||
|
|
Loading…
Reference in New Issue