Skip to content

Commit 696444a

Browse files
ColinIanKingDaniel Bristot de Oliveira
authored andcommitted
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. Link: https://lore.kernel.org/all/20230727150117.627730-1-colin.i.king@gmail.com/ Fixes: a957cbc ("rtla: Add -C cgroup support") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
1 parent a0c04a3 commit 696444a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/tracing/rtla/src/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ static const int find_mount(const char *fs, char *mp, int sizeof_mp)
538538
{
539539
char mount_point[MAX_PATH];
540540
char type[100];
541-
int found;
541+
int found = 0;
542542
FILE *fp;
543543

544544
fp = fopen("/proc/mounts", "r");

0 commit comments

Comments
 (0)