summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/mdso_unit_ctx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/driver/mdso_unit_ctx.c b/src/driver/mdso_unit_ctx.c
index 14fbe27..ae90394 100644
--- a/src/driver/mdso_unit_ctx.c
+++ b/src/driver/mdso_unit_ctx.c
@@ -49,7 +49,10 @@ static FILE * mdso_stdin_to_tmp(const struct mdso_driver_ctx * dctx)
if ((fdtmp = dup(ictx->fdtmpin)) < 0)
return 0;
- return fdopen(fdtmp,"r");
+ if (!(ftmp = fdopen(fdtmp,"r")))
+ close(fdtmp);
+
+ return ftmp;
}
if (!(ftmp = tmpfile()))