Skip to content

Commit

Permalink
fix(sinsp): guard against uninitialized use
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Roberts <[email protected]>
  • Loading branch information
Adam Roberts authored and poiana committed Jan 29, 2025
1 parent 319409a commit 3476089
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userspace/libsinsp/sinsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ void sinsp::get_capture_stats(scap_stats* stats) const {
}

void sinsp::print_capture_stats(sinsp_logger::severity sev) const {
scap_stats stats;
scap_stats stats = {};
get_capture_stats(&stats);

libsinsp_logger()->format(
Expand Down Expand Up @@ -1822,7 +1822,7 @@ void sinsp::get_read_progress_plugin(double* nres, std::string* sres) const {
return;
}

uint32_t nplg;
uint32_t nplg = 0;
*sres = m_input_plugin->get_progress(nplg);

*nres = ((double)nplg) / 100;
Expand Down

0 comments on commit 3476089

Please sign in to comment.