Explorar o código

core: set to-params pointer to null after freeing

- avoid potential double freeing issues or invalid pointer access
Daniel-Constantin Mierla %!s(int64=12) %!d(string=hai) anos
pai
achega
14835f89fc
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;
 }