[sr-dev] git:5.0:8a02d964: core: free parsed Required header structure

Daniel-Constantin Mierla miconda at gmail.com
Wed Feb 15 12:58:25 CET 2017


Module: kamailio
Branch: 5.0
Commit: 8a02d964ffc6145b3ae2f349b8d25aff4dacde3a
URL: https://github.com/kamailio/kamailio/commit/8a02d964ffc6145b3ae2f349b8d25aff4dacde3a

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-02-15T12:55:50+01:00

core: free parsed Required header structure

(cherry picked from commit d31558b31fd607f842caa04d85ce8870f6fc1740)

---

Modified: src/core/parser/hf.c
Modified: src/core/parser/parse_require.c

---

Diff:  https://github.com/kamailio/kamailio/commit/8a02d964ffc6145b3ae2f349b8d25aff4dacde3a.diff
Patch: https://github.com/kamailio/kamailio/commit/8a02d964ffc6145b3ae2f349b8d25aff4dacde3a.patch

---

diff --git a/src/core/parser/hf.c b/src/core/parser/hf.c
index 4b82fbe..ba0d5fb 100644
--- a/src/core/parser/hf.c
+++ b/src/core/parser/hf.c
@@ -154,6 +154,7 @@ void clean_hdr_field(struct hdr_field* const hf)
 			free_subscription_state((subscription_state_t**)h_parsed);
 			break;
 
+		case HDR_REQUIRE_T:
 		case HDR_SUPPORTED_T:
 			hdr_free_parsed(h_parsed);
 			break;
@@ -172,7 +173,6 @@ void clean_hdr_field(struct hdr_field* const hf)
 		case HDR_CONTENTTYPE_T:
 		case HDR_CONTENTLENGTH_T:
 		case HDR_RETRY_AFTER_T:
-		case HDR_REQUIRE_T:
 		case HDR_PROXYREQUIRE_T:
 		case HDR_UNSUPPORTED_T:
 		case HDR_ACCEPTLANGUAGE_T:
diff --git a/src/core/parser/parse_require.c b/src/core/parser/parse_require.c
index a520318..e343e7f 100644
--- a/src/core/parser/parse_require.c
+++ b/src/core/parser/parse_require.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2006 Andreas Granig <agranig at linguin.org>
- * 
+ *
  * This file is part of Kamailio, a free SIP server.
  *
  * Kamailio is free software; you can redistribute it and/or modify
@@ -65,7 +65,7 @@ int parse_require( struct sip_msg *msg)
 		require |= rb->option_tags;
 	}
 
-	((struct option_tag_body*)msg->require->parsed)->option_tags_all = 
+	((struct option_tag_body*)msg->require->parsed)->option_tags_all =
 		require;
 	return 0;
 }




More information about the sr-dev mailing list