Bogdan Harjoc d0cde45477
dns-example: free result in getaddrinfo callback
According to evdns.c, the result not freed by libevent after
the callback runs:

evdns_getaddrinfo_gotresolve()
{
    ...
    data->user_cb(0, data->pending_result, data->user_data);
    data->pending_result = NULL;
    ...
}

To reproduce, build with -fsanitize=address, add -g to the getopt
list in dns-example.c like in the current commit and run

  dns-example -g google.com

Closes: #681 # cherry-picked
(cherry picked from commit 855f0804305a545da6880850d16809969ce72edd)
2019-02-02 15:17:58 +03:00
..
2019-02-02 15:13:51 +03:00
2016-12-13 11:54:09 +08:00
2019-02-02 15:17:55 +03:00
2019-02-02 15:17:55 +03:00