Module: sip-router
Branch: master
Commit: c737ff95bb2e742981d81088169baa60d4605b85
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c737ff9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jun 13 11:51:57 2012 +0200
drouting: reset the content of routing tree if root pointer is not freed
- reported by Yufei Tao
---
modules_k/drouting/routing.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules_k/drouting/routing.c b/modules_k/drouting/routing.c
index 1ff7629..f54709e 100644
--- a/modules_k/drouting/routing.c
+++ b/modules_k/drouting/routing.c
@@ -460,7 +460,8 @@ free_rt_data(
shm_free(rt_data->noprefix.rg);
rt_data->noprefix.rg = 0;
}
- /* del top level */
+ /* del top level or reset to 0 it's content */
if (all) shm_free(rt_data);
+ else memset(rt_data, 0, sizeof(rt_data_t));
}
}