if (search == NULL) { pk11_FreeSession(session); return CKR_OK;
pk11_FreeSession(session); if (search != NULL) { pk11_FreeSearch(search);
CK_RV NSC_FindObjectsFinal(CK_SESSION_HANDLE hSession){    PK11Session *session;    PK11SearchResults *search;    session = pk11_SessionFromHandle(hSession);    if (session == NULL) return CKR_SESSION_HANDLE_INVALID;    search = session->search;    session->search = NULL;    if (search == NULL) {	pk11_FreeSession(session);	return CKR_OK;    }    pk11_FreeSearch(search);    return CKR_OK;}