mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
res_stasis_playback: Check for failure to append vector.
Free resources and return error if we fail to append the vector in stasis_app_control_play_uri. Change-Id: I22c4a90dd859b253f2850c6511de48b25609422b
This commit is contained in:
@@ -497,7 +497,11 @@ struct stasis_app_playback *stasis_app_control_play_uri(
|
||||
|
||||
/* safe */
|
||||
strcpy(media_uri, media[i]);
|
||||
AST_VECTOR_APPEND(&playback->medias, media_uri);
|
||||
if (AST_VECTOR_APPEND(&playback->medias, media_uri)) {
|
||||
ao2_ref(playback, -1);
|
||||
ast_free(media_uri);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (skipms == 0) {
|
||||
|
Reference in New Issue
Block a user