Browse code

Split free_to to two functions: free_to_params and free_to.

This patch splits the function free_to to two functions, free_to_params
which only destroys the linked list of parameters and free_to which
calls free_to_params internally and also frees the entire to header
structure.

Jan Janak authored on 15/03/2009 20:02:57
Showing 2 changed files
... ...
@@ -773,7 +773,7 @@ error:
773 773
 }
774 774
 
775 775
 
776
-void free_to(struct to_body* tb)
776
+void free_to_params(struct to_body* tb)
777 777
 {
778 778
 	struct to_param *tp=tb->param_lst;
779 779
 	struct to_param *foo;
... ...
@@ -782,5 +782,11 @@ void free_to(struct to_body* tb)
782 782
 		pkg_free(tp);
783 783
 		tp=foo;
784 784
 	}
785
+}
786
+
787
+
788
+void free_to(struct to_body* tb)
789
+{
790
+	free_to_params(tb);
785 791
 	pkg_free(tb);
786 792
 }
... ...
@@ -65,6 +65,7 @@ struct to_body{
65 65
  */
66 66
 char* parse_to(char* buffer, char *end, struct to_body *to_b);
67 67
 
68
+void free_to_params(struct to_body* tb);
68 69
 
69 70
 void free_to(struct to_body* tb);
70 71