Commit a684f0b7 by S.Çağlar Onur Committed by Stéphane Graber

close the fd on error

parent 0bc8db6b
......@@ -2486,8 +2486,10 @@ static int clone_update_rootfs(struct clone_update_data *data)
SYSERROR("unable to open %s: ignoring\n", path);
return 0;
}
if (fprintf(fout, "%s", c->name) < 0)
if (fprintf(fout, "%s", c->name) < 0) {
fclose(fout);
return -1;
}
if (fclose(fout) < 0)
return -1;
}
......
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