瀏覽代碼

tm: Ensure all contact attributes are initialised to NULL when serial forking

Hugh Waite 10 年之前
父節點
當前提交
192cf785ee
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      modules/tm/t_serial.c

+ 1 - 0
modules/tm/t_serial.c

@@ -263,6 +263,7 @@ int t_load_contacts(struct sip_msg* msg, char* key, char* value)
 			return -1;
 		}
 
+		memset(next, 0, sizeof(struct contact));
 		next->uri.s = branch->uri;
 		next->uri.len = branch->len;
 		next->dst_uri.s = branch->dst_uri;