From: Russell Bryant Date: Sat, 7 May 2011 23:35:37 +0000 (+0000) Subject: res_config_curl: fix a crash with static realtime. X-Git-Tag: 1.8.5-rc1~11^2~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6313aeb1fd7d3c505e5893f7cc8c00e099d69f69;p=thirdparty%2Fasterisk.git res_config_curl: fix a crash with static realtime. (closes issue #18413) Reported by: jmls Patches: 20101202__issue18413.diff.txt uploaded by tilghman (license 14) Tested by: jmls git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318057 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_config_curl.c b/res/res_config_curl.c index 0ff6694dcb..6ee6e96f4e 100644 --- a/res/res_config_curl.c +++ b/res/res_config_curl.c @@ -583,7 +583,7 @@ static struct ast_config *config_curl(const char *url, const char *unused, const return NULL; } - if (strcmp(category, cur_cat) || last_cat_metric != cat_metric) { + if (!cat || strcmp(category, cur_cat) || last_cat_metric != cat_metric) { if (!(cat = ast_category_new(category, "", 99999))) break; cur_cat = category;