fix possible segfault after failed port alloc w/ iptables option

fixes #767

Change-Id: I8034849655f1c6e4e59cf341b0ff99066223fcbc
changes/68/29568/1
Richard Fuchs 6 years ago
parent 77e31f1fb1
commit 985cd44c2b

@ -286,6 +286,9 @@ static int __iptables_add_rule(const socket_t *local_sock, const str *comment) {
static int __iptables_del_rule(const socket_t *local_sock) {
const char *err;
if (!local_sock || !local_sock->family)
return 0;
switch (local_sock->family->af) {
case AF_INET:
err = ip4tables_del_rule(local_sock);

Loading…
Cancel
Save