diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-30 12:30:08 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-30 12:30:08 +0000 |
commit | 52268e0664cc8a36908e3d0b08f6b2ffdea59755 (patch) | |
tree | da8ce1dd8ade292d99e3fd588dc4f509ed71b147 /pbx/pbx_ael.c | |
parent | c5049bbee1d4f78f8b4ec9b410b00096b847d2ef (diff) |
make destroy_pval able to handle a NULL value
(the warning should be removed);
define a 'elements_block' rule to simplify some other rules
removing duplicated code - runtests seems happy with this.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23613 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_ael.c')
-rw-r--r-- | pbx/pbx_ael.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index ad5bc674a..abc566f91 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -3554,6 +3554,11 @@ STD_MOD(MOD_1 | NO_USECOUNT, reload, NULL, NULL); void destroy_pval_item(pval *item) { + if (item == NULL) { + ast_log(LOG_WARNING, "null item\n"); + return; + } + if (item->filename) free(item->filename); |