]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/sys_generic.c
xnu-1228.9.59.tar.gz
[apple/xnu.git] / bsd / kern / sys_generic.c
index 0fe948aaed433cfcc7f547d929b912e7e3e31d09..509468087c76eb31fcbfd922eb3c29a9e1d3c256 100644 (file)
@@ -224,7 +224,7 @@ pread_nocancel(struct proc *p, struct pread_nocancel_args *uap, user_ssize_t *re
        int error;
 
        if ( (error = preparefileread(p, &fp, fd, 1)) )
        int error;
 
        if ( (error = preparefileread(p, &fp, fd, 1)) )
-               return (error);
+               goto out;
 
        error = dofileread(vfs_context_current(), fp, uap->buf, uap->nbyte,
                        uap->offset, FOF_OFFSET, retval);
 
        error = dofileread(vfs_context_current(), fp, uap->buf, uap->nbyte,
                        uap->offset, FOF_OFFSET, retval);
@@ -234,7 +234,8 @@ pread_nocancel(struct proc *p, struct pread_nocancel_args *uap, user_ssize_t *re
        if (!error)
            KERNEL_DEBUG_CONSTANT((BSDDBG_CODE(DBG_BSD_SC_EXTENDED_INFO, SYS_pread) | DBG_FUNC_NONE),
              uap->fd, uap->nbyte, (unsigned int)((uap->offset >> 32)), (unsigned int)(uap->offset), 0);
        if (!error)
            KERNEL_DEBUG_CONSTANT((BSDDBG_CODE(DBG_BSD_SC_EXTENDED_INFO, SYS_pread) | DBG_FUNC_NONE),
              uap->fd, uap->nbyte, (unsigned int)((uap->offset >> 32)), (unsigned int)(uap->offset), 0);
-       
+
+out:
        return (error);
 }
 
        return (error);
 }