소스 검색

ims_registrar_pcscf: Make sure, Contact-Info-Structure is properly initialized.

Carsten Bock 11 년 전
부모
커밋
2cfe0862fa
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      modules/ims_registrar_pcscf/save.c

+ 4 - 0
modules/ims_registrar_pcscf/save.c

@@ -131,6 +131,10 @@ static inline int update_contacts(struct sip_msg *req,struct sip_msg *rpl, udoma
 		 * then, we will update on NOTIFY */
 		return 0;
 	}
+
+	// Set the structure to "0", to make sure it's properly initialized
+	memset(&ci, 0, sizeof(struct pcontact_info));
+
 	for (h = rpl->contact; h; h = h->next) {
 		if (h->type == HDR_CONTACT_T && h->parsed)
 			for (c = ((contact_body_t*) h->parsed)->contacts; c; c = c->next) {