Merge branch 'tmp-enable-asan' into 'master'

.gitlab-ci.yml: reenable address sanitizer

See merge request openconnect/ocserv!202
This commit is contained in:
Nikos Mavrogiannopoulos
2020-08-06 11:10:13 +00:00
11 changed files with 107 additions and 32 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -558,6 +558,7 @@ int main(int argc, char **argv)
const char *file = NULL;
void *gl_pool;
cmd_params_st params;
int ret;
memset(&params, 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, &params));
ret = single_cmd(argc, argv, gl_pool, file, &params);
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;
}