projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c13e6c7
)
mount-util: call CLEANUP_ARRAY after allocating array
author
Luca Boccassi
<bluca@debian.org>
Thu, 2 Nov 2023 09:34:18 +0000
(09:34 +0000)
committer
Luca Boccassi
<luca.boccassi@gmail.com>
Thu, 2 Nov 2023 15:34:10 +0000
(15:34 +0000)
Coverity gets confused if it is called before.
CID#
1523757
src/shared/mount-util.c
patch
|
blob
|
history
diff --git
a/src/shared/mount-util.c
b/src/shared/mount-util.c
index a7493a38147e363972a8251e9e2683bf6e2d9e1d..02640a13a9e4cecac24494986b42e16a09668931 100644
(file)
--- a/
src/shared/mount-util.c
+++ b/
src/shared/mount-util.c
@@
-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;