mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
mount-util: call CLEANUP_ARRAY after allocating array
Coverity gets confused if it is called before. CID#1523757
This commit is contained in:
committed by
Luca Boccassi
parent
c13e6c720d
commit
6d5202ccaa
@@ -1378,12 +1378,12 @@ int remount_idmap_fd(
|
||||
int *mount_fds = NULL;
|
||||
size_t n_mounts_fds = 0;
|
||||
|
||||
CLEANUP_ARRAY(mount_fds, n_mounts_fds, close_many_and_free);
|
||||
|
||||
mount_fds = new(int, n);
|
||||
if (!mount_fds)
|
||||
return log_oom_debug();
|
||||
|
||||
CLEANUP_ARRAY(mount_fds, n_mounts_fds, close_many_and_free);
|
||||
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
int mntfd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user