[sr-dev] [kamailio/kamailio] keepalive.list crash (#2618)

juha-h notifications at github.com
Tue Feb 2 18:43:08 CET 2021


For some reason destination list is allocated with one uninitialized  item already in it:
```
int ka_alloc_destinations_list()
{
	if(ka_destinations_list != NULL) {
		LM_DBG("ka_destinations_list already allocated\n");
		return 1;
	}

	ka_destinations_list = (ka_destinations_list_t *)shm_malloc(
			sizeof(ka_destinations_list_t));
```
It may be the source of trouble when keepalive_rpc_list tries to list it:
```
static void keepalive_rpc_list(rpc_t *rpc, void *ctx)
{
	void *sub;
	ka_dest_t *dest;
	char t_buf[26] = {0};

	for(dest = ka_destinations_list->first; dest != NULL; dest = dest->next) {
```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2618#issuecomment-771830462
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210202/f1c02192/attachment.htm>


More information about the sr-dev mailing list