Changes between Initial Version and Version 1 of Ticket #10232, comment 3


Ignore:
Timestamp:
Nov 22, 2013, 4:21:23 PM (7 years ago)
Author:
anevilyak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10232, comment 3

    initial v1  
    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.
     1While 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.