mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Merge "stasis: Release object if vector append fails."
This commit is contained in:
		| @@ -1240,10 +1240,9 @@ struct ast_multi_object_blob *ast_multi_object_blob_create(struct ast_json *blob | |||||||
| void ast_multi_object_blob_add(struct ast_multi_object_blob *multi, | void ast_multi_object_blob_add(struct ast_multi_object_blob *multi, | ||||||
| 	enum stasis_user_multi_object_snapshot_type type, void *object) | 	enum stasis_user_multi_object_snapshot_type type, void *object) | ||||||
| { | { | ||||||
| 	if (!multi || !object) { | 	if (!multi || !object || AST_VECTOR_APPEND(&multi->snapshots[type], object)) { | ||||||
| 		return; | 		ao2_cleanup(object); | ||||||
| 	} | 	} | ||||||
| 	AST_VECTOR_APPEND(&multi->snapshots[type],object); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /*! \brief Publish single channel user event (for app_userevent compatibility) */ | /*! \brief Publish single channel user event (for app_userevent compatibility) */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user