From 39df315d97c6b773204762e33b11cf4587421dfe Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Thu, 3 Apr 2014 11:43:24 +0000 Subject: [PATCH] res_hep: Fix crash when hep.conf not available Parts of res_hep properly checked for a valid configuration object before attempting to access the configuration. A check, however, was missed when a packet is sent. This patch fixes the crash caused by not checking if the configuration object is valid. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411668 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_hep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/res_hep.c b/res/res_hep.c index 80863d332f..474e15d6af 100644 --- a/res/res_hep.c +++ b/res/res_hep.c @@ -532,7 +532,7 @@ int hepv3_send_packet(struct hepv3_capture_info *capture_info) RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup); int res; - if (!config->general->enabled) { + if (!config || !config->general->enabled) { return 0; } -- 2.47.3