From 9783d00623fe5e6e66b13c5c48e82416e98b9b2b Mon Sep 17 00:00:00 2001 From: file Date: Mon, 1 Oct 2007 15:57:04 +0000 Subject: Check to make sure a structure pointer is non-NULL before touching it... crashing is bad, mmmk? (closes issue #10831) Reported by: eliel Patches: chan_sip.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84176 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'channels/chan_sip.c') diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c671b62bd..2bd516b8d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18912,7 +18912,7 @@ static char *sip_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a ast_verbose("Previous SIP reload not yet done\n"); else { sip_reloading = TRUE; - sip_reloadreason = a->fd ? CHANNEL_CLI_RELOAD : CHANNEL_MODULE_RELOAD; + sip_reloadreason = (a && a->fd) ? CHANNEL_CLI_RELOAD : CHANNEL_MODULE_RELOAD; } ast_mutex_unlock(&sip_reload_lock); restart_monitor(); -- cgit v1.2.3