[sr-dev] git:master: pdt(k): reset pdtree head if error in init

Elena-Ramona Modroiu ramona at rosdev.ro
Tue Jul 20 19:07:59 CEST 2010


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

Author: Elena-Ramona Modroiu <ramona at asipto.com>
Committer: Elena-Ramona Modroiu <ramona at asipto.com>
Date:   Tue Jul 20 19:06:35 2010 +0200

pdt(k): reset pdtree head if error in init

- avoid second free attempt in mod destroy if the module does not initialize properly

---

 modules_k/pdt/pdt.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules_k/pdt/pdt.c b/modules_k/pdt/pdt.c
index fedd0d6..9428307 100644
--- a/modules_k/pdt/pdt.c
+++ b/modules_k/pdt/pdt.c
@@ -256,7 +256,10 @@ error1:
 		pdt_lock = 0;
 	}
 	if(_ptree!=0)
+	{
 		shm_free(_ptree);
+		_ptree = 0;
+	}
 
 	if(db_con!=NULL)
 	{




More information about the sr-dev mailing list