Commit 696444a5 authored by Colin Ian King's avatar Colin Ian King Committed by Daniel Bristot de Oliveira

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: a957cbc0 ("rtla: Add -C cgroup support")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarDaniel Bristot de Oliveira <bristot@kernel.org>
parent a0c04a32
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment