Closed Bug 1223306 Opened 9 years ago Closed 2 years ago

[CID 221886][CID 221887] dead code in NSSCKFWC_DestroyObject and NSSCKFWC_GetSessionInfo

Categories

(NSS :: Libraries, defect, P3)

defect

Tracking

(firefox45 affected)

RESOLVED WONTFIX
Tracking Status
firefox45 --- affected

People

(Reporter: franziskus, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: coverity)

Both functions (NSSCKFWC_GetSessionInfo and NSSCKFWC_DestroyObject) have a lot of dead code in the loser section, i.e. unsused switch cases for error handling. The code in question hasn't been touched since 2000. Do we want to remove it or keep it?
> loser:
>  switch( error ) {
>  case CKR_SESSION_CLOSED:
>    /* destroy session? */
>    break;
>  case CKR_DEVICE_REMOVED:
>    /* (void)nssCKFWToken_Destroy(fwToken); */
>    break;
>  case CKR_CRYPTOKI_NOT_INITIALIZED:
>  case CKR_DEVICE_ERROR:
>  case CKR_DEVICE_MEMORY:
>  case CKR_FUNCTION_FAILED:
>  case CKR_GENERAL_ERROR:
>  case CKR_HOST_MEMORY:
>  case CKR_SESSION_HANDLE_INVALID:
>    break;
>  default:
>  case CKR_OK:
>    error = CKR_GENERAL_ERROR;
>    break;
>  }
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.