Skip to content

Commit

Permalink
lib: Initialize mbefore for route_map_apply_ext()
Browse files Browse the repository at this point in the history
CID 1601478: Uninitialized variables  (UNINIT)
Using uninitialized value "mbefore.real.tv_usec" when calling "event_consumed_time".

Fixes: 3e3a666 ("lib: Add ability to track time in individual routemaps")

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Nov 8, 2024
1 parent 68ec006 commit f47ae02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,7 @@ route_map_result_t route_map_apply_ext(struct route_map *map,
}

if (map) {
GETRUSAGE(&mbefore);
GETRUSAGE(&mafter);
event_consumed_time(&mafter, &mbefore, &cputime);
map->cputime += cputime;
Expand Down

0 comments on commit f47ae02

Please sign in to comment.