mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
config: Use talloc_free() to free "route" strings
Adding redundant routes triggers a glibc assertion on startup. The offending
config file contained:
route = 192.168.1.0/255.255.255.0
route = default
The assertion:
# ./src/ocserv -c ocserv.conf -f
*** Error in `./src/ocserv': munmap_chunk(): invalid pointer: 0x0000000001703470 ***
Aborted (core dumped)
Fix this by calling the correct free() function.
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
35fae82538
commit
25cfd3b1db
+1
-1
@@ -718,7 +718,7 @@ unsigned force_cert_auth;
|
|||||||
strcmp(config->network.routes[j], "default") == 0) {
|
strcmp(config->network.routes[j], "default") == 0) {
|
||||||
/* set default route */
|
/* set default route */
|
||||||
for (i=0;i<j;i++)
|
for (i=0;i<j;i++)
|
||||||
free(config->network.routes[i]);
|
talloc_free(config->network.routes[i]);
|
||||||
config->network.routes_size = 0;
|
config->network.routes_size = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user