When I corrected the CEL test crash in r394037, I didn't quite pay attention
to how the globals and locals were being shuffled around in the cleanup
callback. I removed the nulling of the global variables, which caused them
to be double cleaned.
This patch puts the global nulling code back (since the vars are cleaned up
by RAII_VARs), and removes the explicit ao2_cleanup() (since they were no-ops,
because the variables had just been nulled).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394089
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
ast_event_unsubscribe(event_sub);
event_sub = NULL;
+ /* cleaned up by RAII_VAR's */
+ cel_expected_events = NULL;
+ cel_received_events = NULL;
+
/* check events */
ast_test_validate(test, !check_events(local_expected, local_received));
ao2_cleanup(saved_config);
saved_config = NULL;
- /* get rid of events */
- ao2_cleanup(cel_received_events);
- cel_received_events = NULL;
- ao2_cleanup(cel_expected_events);
- cel_expected_events = NULL;
+ /* clean up the locks */
ast_mutex_destroy(&sync_lock);
ast_cond_destroy(&sync_out);
return 0;