[sheepdog] [PATCH] sheep: fix vdi exsitence check
Liu Yuan
namei.unix at gmail.com
Fri Aug 24 07:27:59 CEST 2012
On 08/23/2012 09:35 PM, MORITA Kazutaka wrote:
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
> sheep/vdi.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sheep/vdi.c b/sheep/vdi.c
> index aa5134b..e5c27fb 100644
> --- a/sheep/vdi.c
> +++ b/sheep/vdi.c
> @@ -181,10 +181,11 @@ int vdi_exist(uint32_t vid)
> goto out;
> }
>
> - if (*inode->name == '\0')
> + if (*inode->name == '\0') {
> ret = 0;
> + goto out;
> + }
> ret = 1;
> -
> out:
> free(inode);
> return ret;
>
Applied, thanks.
Yuan
More information about the sheepdog
mailing list