Skip to content

Commit c8a2956

Browse files
committed
Replace mask assignment position
1 parent 7c13440 commit c8a2956

File tree

1 file changed

+2
-1
lines changed
  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

1 file changed

+2
-1
lines changed

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3105,7 +3105,6 @@ addr_pool_insert(struct addr_pool *addr_pool, const char *addr, uint8 mask)
31053105
}
31063106

31073107
next->next = NULL;
3108-
next->mask = mask;
31093108

31103109
if (os_socket_inet_network(true, addr, &target) != BHT_OK) {
31113110
// If parsing IPv4 fails, try IPv6
@@ -3120,6 +3119,7 @@ addr_pool_insert(struct addr_pool *addr_pool, const char *addr, uint8 mask)
31203119
wasm_runtime_free(next);
31213120
return false;
31223121
}
3122+
next->mask = mask;
31233123
}
31243124
else {
31253125
next->type = IPv4;
@@ -3128,6 +3128,7 @@ addr_pool_insert(struct addr_pool *addr_pool, const char *addr, uint8 mask)
31283128
wasm_runtime_free(next);
31293129
return false;
31303130
}
3131+
next->mask = mask;
31313132
}
31323133

31333134
/* attach with */

0 commit comments

Comments
 (0)