nfctype4: Make ISO_send_cmd() error handling consistent

Currently, when ISO_send_cmd() can't allocate
a type4_cmd structure, it does not call
t4_cookie_release().  However, when ISO_send_cmd()
calls near_adapter_send() and it fails,
t4_cookie_release() will be called.  So make
that consistent by having ISO_send_cmd() call
t4_cookie_release() when it cannot allocate a
type4_cmd structure.

Fixing this in ISO_send_cmd() will also make the
error handing in ISO_Select(), ISO_ReadBinary(),
and ISO_Update() consistent.
1 file changed