• Show log

    Commit

  • Hash : 9a38bc5f
    Author : Tomas Gonzalez
    Date : 2021-11-01T10:01:06

    evutil: Fix evutil_freeaddrinfo
    
    During testing on win32, util/getaddrinfo failed with NULL hint info
    
         r = evutil_getaddrinfo("www.google.com", NULL, NULL, &ai);
    
    throwing a critical heap exception when evutil_freeaddrinfo is called.
    This is because of improper use of freeaddrinfo when nodes within the
    ai structure are allocated using mm_malloc or mm_calloc
    (EVUTIL_AI_LIBEVENT_ALLOCATED)
    
    This adds the flag in apply_socktype_protocol_hack and walks the linked
    list in evutil_freeaddrinfo removing linked list nodes that are custom
    allocated before calling freeaddrinfo.