Quellcode durchsuchen

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

Jan Janak vor 22 Jahren
Ursprung
Commit
abb343de09
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
  1. 10 0
      parser/hf.c

+ 10 - 0
parser/hf.c

@@ -23,6 +23,10 @@
  * You should have received a copy of the GNU General Public License 
  * along with this program; if not, write to the Free Software 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * History:
+ * -------
+ * 2003-03-26 Frees also hdr->parsed for Route & Record-Route (janakj)
  */
 
 
@@ -36,6 +40,7 @@
 #include "digest/digest.h" /* free_credentials */
 #include "parse_event.h"
 #include "parse_expires.h"
+#include "parse_rr.h"
 #include "contact/parse_contact.h"
 
 
@@ -80,6 +85,11 @@ void clean_hdr_field(struct hdr_field* hf)
 			free_contact((contact_body_t**)(&(hf->parsed)));
 			break;
 
+		case HDR_ROUTE:
+		case HDR_RECORDROUTE:
+			free_rr((rr_t**)(&hf->parsed));
+			break;
+
 		case HDR_CONTENTLENGTH:
 		case HDR_CONTENTTYPE:
 			break;