Fix missing unlock on error in uio_open()

This adds the missing unlock before function return if malloc() fails.