1 | | While this is correct as far as the CID is concerned, it's not entirely complete: in the case where {{{ fValues->AddItem() }}} succeeds, but {{{ fSelections->AddItem() }}} fails, it should remove the value, and free it in addition to {{{ nameCopy }}}. 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. |
| 1 | While this is correct as far as the CID is concerned, it's not entirely complete: in the case where {{{ fValues->AddItem()}}} succeeds, but {{{ fSelections->AddItem()}}} fails, it should remove the value, and free it in addition to {{{nameCopy}}}. 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. |