[sr-dev] git:master: core: set to-params pointer to null after freeing

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 27 14:45:14 CEST 2013


Module: sip-router
Branch: master
Commit: 14835f89fc2b761f73a0caad67d229ec3fedba29
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=14835f89fc2b761f73a0caad67d229ec3fedba29

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Aug 27 14:44:17 2013 +0200

core: set to-params pointer to null after freeing

- avoid potential double freeing issues or invalid pointer access

---

 parser/parse_addr_spec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/parser/parse_addr_spec.c b/parser/parse_addr_spec.c
index 41b2ac7..1820e6c 100644
--- a/parser/parse_addr_spec.c
+++ b/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;
 }
 
 




More information about the sr-dev mailing list