[Ocfs2-tools-devel] [PATCH 4/4] mounted.ocfs2: evaluating a garbage value 'proc'
Sunil Mushran
sunil.mushran at oracle.com
Mon Sep 19 09:28:34 PDT 2011
Easier solution is to init proc = NULL.
On 09/17/2011 08:47 PM, chuanchang.jia at gmail.com wrote:
> mounted.ocfs2: evaluating a garbage value 'proc'.
>
> Signed-off-by: Alex Jia<chuanchang.jia at gmail.com>
> ---
> mounted.ocfs2/mounted.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/mounted.ocfs2/mounted.c b/mounted.ocfs2/mounted.c
> index f76556c..7de2140 100644
> --- a/mounted.ocfs2/mounted.c
> +++ b/mounted.ocfs2/mounted.c
> @@ -289,7 +289,7 @@ static errcode_t build_partition_list(struct list_head *dev_list, char *device)
>
> ret = ocfs2_malloc0(sizeof(ocfs2_devices),&dev);
> if (ret)
> - goto bail;
> + goto out;
>
> /*
> * Try to translate private device-mapper dm-<N> names
> @@ -339,6 +339,11 @@ bail:
> fclose(proc);
>
> return ret;
> +
> +out:
> + if (ret&& dev)
> + ocfs2_free(&dev);
> + return ret;
> }
>
> static void usage(char *progname)
More information about the Ocfs2-tools-devel
mailing list