[asterisk-commits] dlee: branch dlee/stasis-core r382503 - /team/dlee/stasis-core/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 6 10:23:45 CST 2013
Author: dlee
Date: Wed Mar 6 10:23:41 2013
New Revision: 382503
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382503
Log:
Forgot to cleanup update->type
Modified:
team/dlee/stasis-core/main/stasis_cache.c
Modified: team/dlee/stasis-core/main/stasis_cache.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-core/main/stasis_cache.c?view=diff&rev=382503&r1=382502&r2=382503
==============================================================================
--- team/dlee/stasis-core/main/stasis_cache.c (original)
+++ team/dlee/stasis-core/main/stasis_cache.c Wed Mar 6 10:23:41 2013
@@ -271,6 +271,8 @@
update->old_snapshot = NULL;
ao2_cleanup(update->new_snapshot);
update->new_snapshot = NULL;
+ ao2_cleanup(update->type);
+ update->type = NULL;
}
static struct stasis_message *update_create(struct stasis_topic *topic, struct stasis_message *old_snapshot, struct stasis_message *new_snapshot)
@@ -279,6 +281,7 @@
RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
ast_assert(topic != NULL);
+ ast_assert(old_snapshot != NULL || new_snapshot != NULL);
update = ao2_alloc(sizeof(*update), stasis_cache_update_dtor);
if (!update) {
@@ -421,13 +424,11 @@
__cache_update = stasis_message_type_create("stasis_cache_update");
if (!__cache_update) {
- ast_log(LOG_ERROR, "Stasis threadpool allocation failed\n");
return -1;
}
__cache_clear_data = stasis_message_type_create("StasisCacheClear");
if (!__cache_clear_data) {
- ast_log(LOG_ERROR, "Failed to initialize Stasis cache\n");
return -1;
}
return 0;
More information about the asterisk-commits
mailing list