Module: sip-router
Branch: 3.2
Commit: 926caef8f2b37dc83aab12aa5b8f717a9eeff328
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=926caef…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Nov 26 00:32:23 2011 +0100
dialog(k): safety check for lookup in dialog table at shutdown
(cherry picked from commit 017ea5779710223df8f5a28829f77eff8395affc)
(cherry picked from commit b018f09abbecc6b057c6f9446406c6f20f43a235)
---
modules_k/dialog/dlg_hash.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules_k/dialog/dlg_hash.c b/modules_k/dialog/dlg_hash.c
index 296efdd..2dbf9a0 100644
--- a/modules_k/dialog/dlg_hash.c
+++ b/modules_k/dialog/dlg_hash.c
@@ -444,6 +444,9 @@ dlg_cell_t *dlg_lookup( unsigned int h_entry, unsigned int h_id)
dlg_cell_t *dlg;
dlg_entry_t *d_entry;
+ if(d_table==NULL)
+ return 0;
+
if (h_entry>=d_table->size)
goto not_found;