From db486471613b80f756a26578f6015a690dc8212f Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 23 Dec 2015 22:12:14 -0500 Subject: driver: added driver-level handling of stdin. --- src/driver/mdso_driver_ctx.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/driver/mdso_driver_ctx.c') diff --git a/src/driver/mdso_driver_ctx.c b/src/driver/mdso_driver_ctx.c index 1538d95..14f1e75 100644 --- a/src/driver/mdso_driver_ctx.c +++ b/src/driver/mdso_driver_ctx.c @@ -86,6 +86,7 @@ static struct mdso_driver_ctx_impl * mdso_driver_ctx_alloc( *units++ = entry->arg; ictx->meta = meta; + ictx->ctx.fdtmpin = -1; ictx->ctx.ctx.units = ictx->units; return &ictx->ctx; } @@ -267,6 +268,9 @@ static void mdso_free_driver_ctx_impl(struct mdso_driver_ctx_alloc * ictx) if (ictx->ctx.fddst >= 0) close(ictx->ctx.fddst); + if (ictx->ctx.fdtmpin >= 0) + close(ictx->ctx.fdtmpin); + if (ictx->ctx.asmbase) free(ictx->ctx.asmbase); -- cgit v1.2.3