summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/ari/resource_bridges.c1
-rw-r--r--res/res_xmpp.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/res/ari/resource_bridges.c b/res/ari/resource_bridges.c
index 8c058c4a7..d6a0400c8 100644
--- a/res/ari/resource_bridges.c
+++ b/res/ari/resource_bridges.c
@@ -387,7 +387,6 @@ static int ari_bridges_play_helper(const char *args_media,
if (ast_asprintf(playback_url, "/playbacks/%s",
stasis_app_playback_get_id(playback)) == -1) {
- playback_url = NULL;
ast_ari_response_alloc_failed(response);
return -1;
}
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index 6ba4014c7..1b0ae427b 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -3911,8 +3911,11 @@ static int fetch_access_token(struct ast_xmpp_client_config *cfg)
struct ast_json_error error;
RAII_VAR(struct ast_json *, jobj, NULL, ast_json_unref);
- ast_asprintf(&cmd, "CURL(%s,client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token)",
- url, cfg->oauth_clientid, cfg->oauth_secret, cfg->refresh_token);
+ if (ast_asprintf(&cmd,
+ "CURL(%s,client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token)",
+ url, cfg->oauth_clientid, cfg->oauth_secret, cfg->refresh_token) < 0) {
+ return -1;
+ }
ast_debug(2, "Performing OAuth 2.0 authentication for client '%s' using command: %s\n",
cfg->name, cmd);