mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
config-ports: added error checking on talloc
This commit is contained in:
@@ -36,6 +36,11 @@ static int append_port(void *pool, FwPortSt ***fw_ports, size_t *n_fw_ports, int
|
||||
return -1;
|
||||
|
||||
current = talloc(pool, FwPortSt);
|
||||
if (current == NULL) {
|
||||
talloc_free(*fw_ports);
|
||||
*fw_ports = NULL;
|
||||
return -1;
|
||||
}
|
||||
fw_port_st__init(current);
|
||||
|
||||
current->port = port;
|
||||
|
||||
Reference in New Issue
Block a user