Close pipes when fork() fails

parent f40584d5
......@@ -251,6 +251,12 @@ vdp_init(struct vdp_ctx *ctx, void **priv, struct objcore *objcore)
if (state->chldpid < 0) {
VSLb(ctx->vsl, SLT_Error, "vdfp_pipe: vdp %s: fork failed for "
"%s: %s", obj->name, obj->path, vstrerror(errno));
closefd(&in[0]);
closefd(&in[1]);
closefd(&out[0]);
closefd(&out[1]);
closefd(&err[0]);
closefd(&err[1]);
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