public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 lib/filters/filter-regex.c ./WHATS_NEW
Date: Mon, 13 Feb 2012 11:16:00 -0000	[thread overview]
Message-ID: <20120213111643.17448.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-13 11:16:42

Modified files:
	lib/filters    : filter-regex.c 
	.              : WHATS_NEW 

Log message:
	Add check for allocation failure

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/filters/filter-regex.c.diff?cvsroot=lvm2&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2289&r2=1.2290

--- LVM2/lib/filters/filter-regex.c	2011/08/30 14:55:17	1.32
+++ LVM2/lib/filters/filter-regex.c	2012/02/13 11:16:42	1.33
@@ -110,16 +110,17 @@
 		count++;
 	}
 
-	/*
-	 * allocate space for them
-	 */
-	if (!(regex = dm_pool_alloc(scratch, sizeof(*regex) * count)))
-		goto_out;
+	/* Allocate space for them */
+	if (!(regex = dm_pool_alloc(scratch, sizeof(*regex) * count))) {
+		log_error("Failed to allocate regex.");
+		goto out;
+	}
 
-	/*
-	 * create the accept/reject bitset
-	 */
-	rf->accept = dm_bitset_create(rf->mem, count);
+	/* Create the accept/reject bitset */
+	if (!(rf->accept = dm_bitset_create(rf->mem, count))) {
+		log_error("Failed to create bitset.");
+		goto out;
+	}
 
 	/*
 	 * fill the array back to front because we
--- LVM2/WHATS_NEW	2012/02/13 11:10:37	1.2289
+++ LVM2/WHATS_NEW	2012/02/13 11:16:42	1.2290
@@ -1,5 +1,6 @@
 Version 2.02.92 - 
 ====================================
+  Add check for allocation failure in _build_matcher().
   Add check for rimage name allocation failure in _raid_add_images().
   Add check for mda_copy failure in _text_pv_setup().
   Add check for _mirrored_init_target failure.


                 reply	other threads:[~2012-02-13 11:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120213111643.17448.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).