[Xcb] xcb_disconnect() does not free all the ressources

Vincent Torri vtorri at univ-evry.fr
Thu Sep 2 03:07:54 PDT 2010



On Thu, 2 Sep 2010, Julien Danjou wrote:

> On Thu, Sep 02 2010, Vincent Torri wrote:
>>     struct sockaddr *sockname = malloc(socknamelen),
>     *new_sockname = NULL; 
> Saw that, but the function calling it and getting sockname seems to always 
> free it. But I'm surely missing something.

small test : i put a printf before the malloc and a printf after all the 
free(sockname). I get:

torri:~/code: ./xcb
malloc sockname
malloc sockname
free sockname 3

the free call is done in get_peer_sock_name(), the one before the last:

     free(sockname);
     sockname = NULL;

     XauDisposeAuth(authptr);

Vincent


More information about the Xcb mailing list