Browse Source

core: set to-params pointer to null after freeing

- avoid potential double freeing issues or invalid pointer access
Daniel-Constantin Mierla 12 năm trước cách đây
mục cha
commit
14835f89fc
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      parser/parse_addr_spec.c

+ 1 - 0
parser/parse_addr_spec.c

@@ -915,6 +915,7 @@ void free_to_params(struct to_body* const tb)
 		pkg_free(tp);
 		tp=foo;
 	}
+	tb->param_lst = NULL;
 }