Merge in SNORT/snort3 from ~SUMIKUM7/snort3:coverity_CSCwo20068_snort to master
Squashed commit of the following:
commit
4004df617faf5598c181ae672b1b304e3e440c1b
Author: Sumit Kumar <sumikum7@cisco.com>
Date: Wed Mar 5 15:31:53 2025 +0530
file_api: making current_context as nullptr before it gets the value of ctx
file_api: since current_context would never be file_got hence removing this style check
file_api: making current_context as nullptr before it gets the value of ctx and removing redundant part of if check
{
int64_t file_id = current_context->get_file_id();
delete current_context;
+ current_context = nullptr;
current_context_delete_pending = false;
FileCache* file_cache = FileService::get_file_cache();
assert(file_cache);
FileContext* file_got = file_cache->get_file(flow, file_id, false, false);
- if (file_got and file_got->verdict == FILE_VERDICT_PENDING and current_context != file_got)
+ if (file_got and file_got->verdict == FILE_VERDICT_PENDING)
{
file_got->user_file_data_mutex.lock();
delete(file_got->get_file_data());