set_quey_params is called in mod_init by init_query_params (https://github.com/kamailio/kamailio/blob/master/src/modules/http_async_clie...), so whenever ah_set_req is called the query_params struct should already have been initialized.
headers.t is a double pointer, the allocated memory is freed later by free_async_query, we are not freeing it inset_query_params. If we don't set it to NULL we end up with a growing headers list (from different request) and we go toward a crash being the memory freed elsewhere.
This being said, do you have a coredump of the crashes? Which OS/libcurl version are you using? Recently a crash at startup had been reported which was due to a combination of libcurl/OS libs: https://github.com/kamailio/kamailio/issues/1391.