Browse code

hdr->parsed for Route & Record-Route fields will be also freed if not empty

Jan Janak authored on 26/03/2003 16:51:07
Showing 1 changed files
... ...
@@ -23,6 +23,10 @@
23 23
  * You should have received a copy of the GNU General Public License 
24 24
  * along with this program; if not, write to the Free Software 
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
+ *
27
+ * History:
28
+ * -------
29
+ * 2003-03-26 Frees also hdr->parsed for Route & Record-Route (janakj)
26 30
  */
27 31
 
28 32
 
... ...
@@ -36,6 +40,7 @@
36 40
 #include "digest/digest.h" /* free_credentials */
37 41
 #include "parse_event.h"
38 42
 #include "parse_expires.h"
43
+#include "parse_rr.h"
39 44
 #include "contact/parse_contact.h"
40 45
 
41 46
 
... ...
@@ -80,6 +85,11 @@ void clean_hdr_field(struct hdr_field* hf)
80 85
 			free_contact((contact_body_t**)(&(hf->parsed)));
81 86
 			break;
82 87
 
88
+		case HDR_ROUTE:
89
+		case HDR_RECORDROUTE:
90
+			free_rr((rr_t**)(&hf->parsed));
91
+			break;
92
+
83 93
 		case HDR_CONTENTLENGTH:
84 94
 		case HDR_CONTENTTYPE:
85 95
 			break;