diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/ael/pval.c | 10 | ||||
-rw-r--r-- | res/res_calendar_icalendar.c | 1 | ||||
-rw-r--r-- | res/res_monitor.c | 4 | ||||
-rw-r--r-- | res/res_odbc.c | 4 |
4 files changed, 15 insertions, 4 deletions
diff --git a/res/ael/pval.c b/res/ael/pval.c index 8dd1f7cf6..9c557df2b 100644 --- a/res/ael/pval.c +++ b/res/ael/pval.c @@ -1160,7 +1160,11 @@ static pval *get_goto_target(pval *item) pval *curr_ext = get_extension_or_contxt(item); /* containing exten, or macro */ pval *curr_cont; - if (item->u1.list && !item->u1.list->next && !strstr((item->u1.list)->u1.str,"${")) { + if (!item->u1.list) { + return NULL; + } + + if (!item->u1.list->next && !strstr((item->u1.list)->u1.str,"${")) { struct pval *x = find_label_in_current_extension((char*)((item->u1.list)->u1.str), curr_ext); return x; } @@ -5882,7 +5886,7 @@ pval* pvalGlobalsWalkStatements( pval *p, pval **next_statement ) { if (!pvalCheckType(p, "pvalGlobalsWalkStatements", PV_GLOBALS)) return 0; - if (!next_statement) { + if (!*next_statement) { *next_statement = p; return p; } else { @@ -5903,7 +5907,7 @@ void pvalTopLevAddObject( pval *p, pval *contextOrObj ) pval *pvalTopLevWalkObjects(pval *p, pval **next_obj ) { - if (!next_obj) { + if (!*next_obj) { *next_obj = p; return p; } else { diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c index 61a400235..b177b4941 100644 --- a/res/res_calendar_icalendar.c +++ b/res/res_calendar_icalendar.c @@ -133,6 +133,7 @@ static icalcomponent *fetch_icalendar(struct icalendar_pvt *pvt) if (!pvt) { ast_log(LOG_ERROR, "There is no private!\n"); + return NULL; } if (!(response = ast_str_create(512))) { diff --git a/res/res_monitor.c b/res/res_monitor.c index 5482f549c..9aca24a0d 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -378,7 +378,9 @@ int AST_OPTIONAL_API_NAME(ast_monitor_start)(struct ast_channel *chan, const cha O_CREAT|O_TRUNC|O_WRONLY, 0, AST_FILE_MODE))) { ast_log(LOG_WARNING, "Could not create file %s\n", monitor->write_filename); - ast_closestream(monitor->read_stream); + if (monitor->read_stream) { + ast_closestream(monitor->read_stream); + } ast_free(monitor); UNLOCK_IF_NEEDED(chan, need_lock); return -1; diff --git a/res/res_odbc.c b/res/res_odbc.c index 5aaff57f1..39475e98e 100644 --- a/res/res_odbc.c +++ b/res/res_odbc.c @@ -365,6 +365,10 @@ static int mark_transaction_active(struct ast_channel *chan, struct odbc_txn_fra chan = tx->owner; } + if (!chan) { + return -1; + } + ast_channel_lock(chan); if (!(txn_store = ast_channel_datastore_find(chan, &txn_info, NULL))) { ast_channel_unlock(chan); |