ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 12096] Leak in preference subsystem (using obsolete type)

Date: Sun, 07 Feb 2016 14:19:30 +0000

Comment # 1 on bug 12096 from
The problem is related to the use of PREF_OBSOLETE. This is used to mark a
preference as obsolete, setting it as a type. Subsequent calls check "if
PREF_OBSOLETE" and do nothing. This includes the free of the memory, hence the
leak. The solution is to change pref_type_t from enum to int, and treat the
PREF_OBSOLETE as an additional flag and not as an alternative type. All the
calls must check this case specifically, except for the free_* call that must
handle it as it was "not obsolete".

The need to change from enum to int comes from the fact that we need to mantain
the nature of the pref, like it was type = PREF_BOOL | PREF_OBSOLETE. This
allows the pref to be "unmarked" as obsolete. This step can't be done using
enums, that only allow symbolic set and not bitwise set.


You are receiving this mail because:
  • You are watching all bug changes.