From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] Fix clang --analyze warning.
Date: Tue, 18 Dec 2012 10:53:41 +0000 [thread overview]
Message-ID: <50D04B35.3070901@redhat.com> (raw)
In-Reply-To: <1355755393-7240-1-git-send-email-sitsofe@yahoo.com>
Hi Sits
On 17/12/12 14:43, Sitsofe Wheeler wrote:
> - Return before a possible NULL pointer dereference.
This is now in gfs2-utils.git master.
Thanks,
Andy
> ---
> gfs2/libgfs2/fs_bits.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/gfs2/libgfs2/fs_bits.c b/gfs2/libgfs2/fs_bits.c
> index 94a612b..e4b5505 100644
> --- a/gfs2/libgfs2/fs_bits.c
> +++ b/gfs2/libgfs2/fs_bits.c
> @@ -149,6 +149,8 @@ int gfs2_set_bitmap(struct gfs2_sbd *sdp, uint64_t blkno, int state)
> break;
> }
>
> + if (bits == NULL)
> + return -1;
> byte = (unsigned char *)(rgd->bh[buf]->b_data + bits->bi_offset) +
> (rgrp_block/GFS2_NBBY - bits->bi_start);
> bit = (rgrp_block % GFS2_NBBY) * GFS2_BIT_SIZE;
>
prev parent reply other threads:[~2012-12-18 10:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 14:43 [Cluster-devel] [PATCH] Fix clang --analyze warning Sitsofe Wheeler
2012-12-18 10:53 ` Andrew Price [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D04B35.3070901@redhat.com \
--to=anprice@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.