Make sure that res is initialized in all cases

This commit is contained in:
Paweł Chmielowski 2012-04-06 12:00:43 +02:00
parent 91964b1aba
commit 09c75af15c
1 changed files with 2 additions and 0 deletions

View File

@ -443,6 +443,8 @@ static ErlDrvSSizeT tls_drv_control(ErlDrvData handle,
b = driver_alloc_binary(size);
b->orig_bytes[0] = 0;
res = 0;
while ((req_size == 0 || rlen < req_size + 1) &&
(res = SSL_read(d->ssl,
b->orig_bytes + rlen,