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:
Jan Friesse 2011-05-30 15:43:14 +02:00
parent d76bb76d1f
commit c2a39cb8e2

View File

@ -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);