--- s390-tools-2.11.0/libdasd/dasd_ioctl.c 2019-09-06 08:13:09.000000000 -0400 +++ s390-tools-2.11.0/libdasd/dasd_ioctl.c 2019-11-25 14:03:25.452391000 -0500 @@ -149,6 +149,7 @@ fd = dasd_open_device(device, O_RDWR); RUN_IOCTL(fd, BLKROGET, &val); *ro = (val != 0) ? true : false; + dasd_close_device(fd); return 0; }