Hi!

On 01/23/2015 10:33 PM, rusname wrote:
> Hello,
> 
> I am using libuv-0.10.27
> 

Wow, that's ancient! :-)

> test/echo-server.c
> 
> static void after_write(uv_write_t* req, int status) {
>   write_req_t* wr;
>   uv_err_t err;
>  
>   /* Free the read/write buffer and the request */
>   wr = (write_req_t*) req;
>   free(wr->buf.base);
>   free(wr);
>        
>   if (status == 0)
>     return;
>        
>   err = uv_last_error(loop);
>   fprintf(stderr, "uv_write error: %s\n", uv_strerror(err));
>        
>   if (err.code == UV_ECANCELED)
>     return;
>        
>   ASSERT(err.code == UV_EPIPE);
>   uv_close((uv_handle_t*)req->handle, on_close);
> }
> 
> Should not we take handle ptr before free(wr) ?
> 

Yes, indeed. That has been fixed somewhere along the way. I suggest you
upgrade to the latest and greatest, for reduced bugs and increased
awesomeness.


Cheers,

-- 
Saúl Ibarra Corretgé
bettercallsaghul.com


-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to