Opened 11 years ago
Closed 11 years ago
#10232 closed bug (fixed)
Minor memory leak fix in media kit ParameterWeb
Reported by: | Ceann | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Kits/Media Kit | Version: | R1/Development |
Keywords: | gci2013 | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
in src/kits/media/ParameterWeb.cpp:2030: BDiscreteParameter::AddItem currently returns without freeing nameCopy. (detected by Coverity, CID 992460)
Fixed by freeing nameCopy.
Attachments (1)
Change History (5)
by , 11 years ago
Attachment: | 0001-Fixed-resource-leak-line-2023-nameCopy-not-freed.patch added |
---|
comment:1 by , 11 years ago
patch: | 0 → 1 |
---|
comment:2 by , 11 years ago
Component: | - General → Kits/Media Kit |
---|---|
Owner: | changed from | to
Note:
See TracTickets
for help on using tickets.
While this is correct as far as the CID is concerned, it's not entirely complete: in the case where
fValues->AddItem()
succeeds, butfSelections->AddItem()
fails, it should remove the value, and free it in addition tonameCopy
. Otherwise, the state of the parameter object will be inconsistent after the call returns. Coverity won't detect that though, since the added value will ultimately be freed by the destructor either way.