Commit 3c35b187 authored by Pekka Pessi's avatar Pekka Pessi

Fixed memory leak in tport_bind_server().

darcs-hash:20051007181646-65a35-82b190390a6c1fb007c6a86ce926999b79e67bc5.gz
parent f7dcec22
......@@ -1994,7 +1994,7 @@ int tport_bind_server(tport_master_t *mr,
if (strcasecmp(tpn->tpn_proto, "tls") == 0) {
pri->pri_primary->tp_tls = tport_init_tls(tags);
if (!pri->pri_primary->tp_tls)
return -1;
goto error;
}
#endif
not_supported = 0;
......@@ -2039,6 +2039,9 @@ int tport_bind_server(tport_master_t *mr,
}
while (!pri && ephemeral_port && !not_supported);
if (li)
su_freelocalinfo(li);
if (not_supported)
error = EPROTONOSUPPORT;
......@@ -2052,6 +2055,11 @@ int tport_bind_server(tport_master_t *mr,
}
return 0;
error:
if (li)
su_freelocalinfo(li);
return -1;
}
......
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