rtla: Fix uninitialized variable found
Subsystems (3)
PATCH 1/1 rtla: Fix uninitialized variable found
Variable found is not being initialized, in the case where the desired mount is not found the variable contains garbage. Fix this by initializing it to zero.
Fixes a957cbc02531 ("rtla: Add -C cgroup support")
Signed-off-by Colin Ian King <[email protected]>
--- tools/tracing/rtla/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tracing/rtla/src/utils.c +1 -1
@@ -538,7 +538,7 @@ static const int find_mount(const char *fs, char *mp, int sizeof_mp) {char mount_point[MAX_PATH ];char type[100 ]; -int found; +int found =0 ;FILE *fp; fp =fopen ("/proc/mounts" ,"r" );
Signature · 1 line
2.39.2
Quoted 6 lines · Colin Ian King
Variable found is not being initialized, in the case where the desired mount is not found the variable contains garbage. Fix this by initializing it to zero.
Fixes a957cbc02531 ("rtla: Add -C cgroup support")Signed-off-by Colin Ian King <[email protected]>
Thanks!
-- Daniel