mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Merge branch 'tmp-enable-asan' into 'master'
.gitlab-ci.yml: reenable address sanitizer See merge request openconnect/ocserv!202
This commit is contained in:
@@ -120,6 +120,12 @@ static int snapshot_add_entry(snapshot_t * snapshot, const char *filename,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int talloc_clear_htable(snapshot_t *s)
|
||||
{
|
||||
htable_clear(&s->ht);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int snapshot_init(void *pool, struct snapshot_t **snapshot, const char *prefix)
|
||||
{
|
||||
snapshot_t *new_snapshot = NULL;
|
||||
@@ -141,6 +147,7 @@ int snapshot_init(void *pool, struct snapshot_t **snapshot, const char *prefix)
|
||||
goto cleanup;
|
||||
|
||||
htable_init(&new_snapshot->ht, snapshot_rehash, new_snapshot);
|
||||
talloc_set_destructor(new_snapshot, talloc_clear_htable);
|
||||
|
||||
*snapshot = new_snapshot;
|
||||
new_snapshot = NULL;
|
||||
|
||||
@@ -341,6 +341,7 @@ const char* script, *next_script = NULL;
|
||||
setenv("USERNAME", proc->username, 1);
|
||||
setenv("GROUPNAME", proc->groupname, 1);
|
||||
setenv("HOSTNAME", proc->hostname, 1);
|
||||
setenv("REMOTE_HOSTNAME", proc->hostname, 1);
|
||||
setenv("DEVICE", proc->tun_lease.name, 1);
|
||||
setenv("USER_AGENT", proc->user_agent, 1);
|
||||
setenv("DEVICE_TYPE", proc->device_type, 1);
|
||||
|
||||
@@ -558,6 +558,7 @@ int main(int argc, char **argv)
|
||||
const char *file = NULL;
|
||||
void *gl_pool;
|
||||
cmd_params_st params;
|
||||
int ret;
|
||||
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
|
||||
@@ -615,7 +616,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* handle all arguments as a command */
|
||||
exit(single_cmd(argc, argv, gl_pool, file, ¶ms));
|
||||
ret = single_cmd(argc, argv, gl_pool, file, ¶ms);
|
||||
talloc_free(gl_pool);
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
interactive:
|
||||
@@ -634,5 +637,6 @@ int main(int argc, char **argv)
|
||||
|
||||
conn_close(conn);
|
||||
|
||||
talloc_free(gl_pool);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user