浏览代码

core: free SE header parsed structure

- use the generic free framework for headers
Daniel-Constantin Mierla 14 年之前
父节点
当前提交
469650e0a9
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      parser/hf.c

+ 6 - 0
parser/hf.c

@@ -210,6 +210,12 @@ void clean_hdr_field(struct hdr_field* hf)
 			break;
 			break;
 
 
 		case HDR_SESSIONEXPIRES_T:
 		case HDR_SESSIONEXPIRES_T:
+			if(*h_parsed) {
+				((hf_parsed_t*)(*h_parsed))->hfree(*h_parsed);
+				*h_parsed = 0;
+			}
+			break;
+
 		case HDR_MIN_SE_T:
 		case HDR_MIN_SE_T:
 		case HDR_ACCEPTCONTACT_T:
 		case HDR_ACCEPTCONTACT_T:
 		case HDR_ALLOWEVENTS_T:
 		case HDR_ALLOWEVENTS_T: