mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-15 03:52:10 +00:00
coroparse: don't leak dirent
Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
d76bb76d1f
commit
c2a39cb8e2
@ -254,7 +254,8 @@ static int read_uidgid_files_into_objdb(
|
||||
|
||||
entry = malloc(len);
|
||||
if (entry == NULL) {
|
||||
return 0;
|
||||
res = 0;
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
for (return_code = readdir_r(dp, entry, &dirent);
|
||||
@ -310,7 +311,8 @@ static int read_service_files_into_objdb(
|
||||
|
||||
entry = malloc(len);
|
||||
if (entry == NULL) {
|
||||
return 0;
|
||||
res = 0;
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
for (return_code = readdir_r(dp, entry, &dirent);
|
||||
|
Loading…
Reference in New Issue
Block a user