When saving mocked log messages, always create the list.

Otherwise, our code needs to check "list && smarlist_len(list)..."
This commit is contained in:
Nick Mathewson 2016-07-06 12:59:43 -04:00
parent ae22c249c3
commit 96d32f02f2

View File

@ -12,6 +12,7 @@ setup_capture_of_logs(int new_level)
int previous_log = log_global_min_severity_;
log_global_min_severity_ = new_level;
mock_clean_saved_logs();
saved_logs = smartlist_new();
MOCK(logv, mock_saving_logv);
return previous_log;
}