Commit 240de36f authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

autofs: do not close NULL image

This will lead to segmentation fault.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 00340443
......@@ -327,9 +327,10 @@ static int autofs_dump_entry(struct mount_info *pm, AutofsEntry *entry)
int ret = -1;
img = open_image(CR_FD_AUTOFS, O_DUMP, pm->s_dev);
if (img)
if (img) {
ret = pb_write_one(img, entry, PB_AUTOFS);
close_image(img);
close_image(img);
}
return ret;
}
......
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