net/sock: recvfrom: Fix double leave_cancellation_point on error path
This commit is contained in:
parent
d76a541a57
commit
61878848ad
@ -320,7 +320,6 @@ static int lc823450_adc_isr(int irq, void *context, FAR void *arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lc823450_adc_bind
|
||||
*
|
||||
|
@ -159,13 +159,13 @@ ssize_t psock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
|
||||
|
||||
psock->s_flags = _SS_SETSTATE(psock->s_flags, _SF_IDLE);
|
||||
|
||||
leave_cancellation_point();
|
||||
if (ret < 0)
|
||||
{
|
||||
errcode = -ret;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
leave_cancellation_point();
|
||||
return ret;
|
||||
|
||||
errout:
|
||||
|
Loading…
Reference in New Issue
Block a user