net/sock: recvfrom: Fix double leave_cancellation_point on error path

This commit is contained in:
Jussi Kivilinna 2017-09-12 07:17:53 -06:00 committed by Gregory Nutt
parent d76a541a57
commit 61878848ad
2 changed files with 1 additions and 2 deletions

View File

@ -320,7 +320,6 @@ static int lc823450_adc_isr(int irq, void *context, FAR void *arg)
}
#endif
/****************************************************************************
* Name: lc823450_adc_bind
*

View File

@ -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: