diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index 8db14d502..7b138eada 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -1382,14 +1382,17 @@ void fs_private_cache(void) { | |||
1382 | struct stat s; | 1382 | struct stat s; |
1383 | if (is_link(cache)) { | 1383 | if (is_link(cache)) { |
1384 | fwarning("user .cache is a symbolic link, tmpfs not mounted\n"); | 1384 | fwarning("user .cache is a symbolic link, tmpfs not mounted\n"); |
1385 | free(cache); | ||
1385 | return; | 1386 | return; |
1386 | } | 1387 | } |
1387 | if (stat(cache, &s) == -1 || !S_ISDIR(s.st_mode)) { | 1388 | if (stat(cache, &s) == -1 || !S_ISDIR(s.st_mode)) { |
1388 | fwarning("no user .cache directory found, tmpfs not mounted\n"); | 1389 | fwarning("no user .cache directory found, tmpfs not mounted\n"); |
1390 | free(cache); | ||
1389 | return; | 1391 | return; |
1390 | } | 1392 | } |
1391 | if (s.st_uid != getuid()) { | 1393 | if (s.st_uid != getuid()) { |
1392 | fwarning("user .cache is not owned by current user, tmpfs not mounted\n"); | 1394 | fwarning("user .cache is not owned by current user, tmpfs not mounted\n"); |
1395 | free(cache); | ||
1393 | return; | 1396 | return; |
1394 | } | 1397 | } |
1395 | 1398 | ||