The Monday 26 May 2014 à 19:37:13 (+0200), Markus Armbruster wrote :
> Has always been leaky.  Spotted by Coverity.
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  block/vvfat.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/block/vvfat.c b/block/vvfat.c
> index 2c82a5c..389704a 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -787,7 +787,9 @@ static int read_directory(BDRVVVFATState* s, int 
> mapping_index)
>           s->current_mapping->path=buffer;
>           s->current_mapping->read_only =
>               (st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) == 0;
> -     }
> +     } else {
> +            g_free(buffer);
> +        }
>      }
>      closedir(dir);

Reviewed-by: Benoit Canet <ben...@irqsave.net>
>  
> -- 
> 1.9.3
> 
> 

Reply via email to