Commit 42a72536 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

autofs: free leaked AutofsEntry in autofs_dump_entry

Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 240de36f
......@@ -338,16 +338,22 @@ static int autofs_dump_entry(struct mount_info *pm, AutofsEntry *entry)
int autofs_dump(struct mount_info *pm)
{
AutofsEntry *entry;
int err;
entry = xmalloc(sizeof(*entry));
if (!entry)
return -1;
autofs_entry__init(entry);
if (autofs_create_entry(pm, entry))
return -1;
err = autofs_create_entry(pm, entry);
if (err)
goto free_entry;
err = autofs_dump_entry(pm, entry);
return autofs_dump_entry(pm, entry);
free_entry:
free(entry);
return err < 0 ? err : 0;
}
typedef struct autofs_info_s {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment