Commit f2e00ae9 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Avoid double free.

parent dc9f26c7
...@@ -112,10 +112,8 @@ getip(int c, unsigned char **ip_r, int *af_r, gnc_t gnc, void *closure) ...@@ -112,10 +112,8 @@ getip(int c, unsigned char **ip_r, int *af_r, gnc_t gnc, void *closure)
ip = malloc(16); ip = malloc(16);
if(ip == NULL) { if(ip == NULL) {
free(t);
return -2; return -2;
} }
free(t);
memcpy(ip, addr, 16); memcpy(ip, addr, 16);
*ip_r = ip; *ip_r = ip;
if(af_r) if(af_r)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment