fix leaked body in error case

This commit is contained in:
Michael Jerris 2014-04-30 16:10:08 -04:00
parent 23b3e172d5
commit a1a397420e
1 changed files with 1 additions and 0 deletions

View File

@ -1370,6 +1370,7 @@ ESL_DECLARE(esl_status_t) esl_recv_event(esl_handle_t *handle, int check_q, esl_
if (r < 0) {
if (!(strerror_r(handle->errnum, handle->err, sizeof(handle->err))))
*(handle->err)=0;
free(body);
goto fail;
} else if (r == 0) {
continue;