diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2023-07-27 18:01:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 13:59:29 +0300 |
commit | 58d47044f6394c566052f0550c207aca970c0fc6 (patch) | |
tree | 5134958869dd6bf75345d10fe6a26f6063fa398a /tools | |
parent | b29b09d5e2ff70a7a5dd6f8c7e93035e101adc4a (diff) | |
download | linux-58d47044f6394c566052f0550c207aca970c0fc6.tar.xz |
rtla: Fix uninitialized variable found
[ Upstream commit 696444a544ecd6d62c1edc89516b376cefb28929 ]
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: a957cbc02531 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tracing/rtla/src/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c index 623a38908ed5..c769d7b3842c 100644 --- a/tools/tracing/rtla/src/utils.c +++ b/tools/tracing/rtla/src/utils.c @@ -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"); |