bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/12] fatfs: fix error handling in diskfs_get_directs


From: Samuel Thibault
Subject: Re: [PATCH 06/12] fatfs: fix error handling in diskfs_get_directs
Date: Wed, 20 Nov 2013 23:51:58 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Wed 20 Nov 2013 14:37:59 +0100, a écrit :
> Found using the Clang Static Analyzer.
> 
> * fatfs/dir.c (diskfs_get_directs): Fix error handling.

Ack.

> ---
>  fatfs/dir.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fatfs/dir.c b/fatfs/dir.c
> index 60fc898..5a38c63 100644
> --- a/fatfs/dir.c
> +++ b/fatfs/dir.c
> @@ -865,6 +865,8 @@ diskfs_get_directs (struct node *dp,
>    err = vm_map (mach_task_self (),
>                  &buf, buflen, 0, 1, memobj, 0, 0, prot, prot, 0);
>    mach_port_deallocate (mach_task_self (), memobj);
> +  if (err)
> +    return err;
>  
>    bufp = buf;
>    for (i = 0; i < entry; i ++)
> -- 
> 1.7.10.4
> 

-- 
Samuel
/*
 * [...] Note that 120 sec is defined in the protocol as the maximum
 * possible RTT.  I guess we'll have to use something other than TCP
 * to talk to the University of Mars.
 * PAWS allows us longer timeouts and large windows, so once implemented
 * ftp to mars will work nicely.
 */
(from /usr/src/linux/net/inet/tcp.c, concerning RTT [retransmission timeout])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]