In dcb.c:dcb_read if there is nothing anymore to read from socket, it wasn't caught anyway. Added test for that case and immediate exit in that case.

This commit is contained in:
VilhoRaatikka 2014-06-25 15:37:44 +03:00
parent 65c42b93cf
commit d30ff534b9

View File

@ -660,6 +660,11 @@ int dcb_read(
n = 0;
goto return_n;
}
else if (b == 0)
{
n = 0;
goto return_n;
}
bufsize = MIN(b, MAX_BUFFER_SIZE);
if ((buffer = gwbuf_alloc(bufsize)) == NULL)