public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib raid/raid.c replicator/replicator.c t ...
@ 2012-01-25 21:54 zkabelac
0 siblings, 0 replies; only message in thread
From: zkabelac @ 2012-01-25 21:54 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-01-25 21:54:00
Modified files:
lib/raid : raid.c
lib/replicator : replicator.c
lib/thin : thin.c
Log message:
Free allocated segment type in error path
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/raid/raid.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/replicator/replicator.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/thin/thin.c.diff?cvsroot=lvm2&r1=1.44&r2=1.45
--- LVM2/lib/raid/raid.c 2011/11/30 02:02:11 1.13
+++ LVM2/lib/raid/raid.c 2012/01/25 21:54:00 1.14
@@ -452,8 +452,10 @@
do {
if ((segtype = raid_segtype_fn[i](cmd)) &&
- !lvm_register_segtype(seglib, segtype))
- return 0;
+ !lvm_register_segtype(seglib, segtype)) {
+ dm_free(segtype);
+ return_0;
+ }
} while (raid_segtype_fn[++i]);
return 1;
--- LVM2/lib/replicator/replicator.c 2011/11/29 12:10:38 1.11
+++ LVM2/lib/replicator/replicator.c 2012/01/25 21:54:00 1.12
@@ -772,8 +772,10 @@
segtype->private = NULL;
segtype->flags = SEG_REPLICATOR;
- if (!lvm_register_segtype(seglib, segtype))
+ if (!lvm_register_segtype(seglib, segtype)) {
+ dm_free(segtype);
return_0;
+ }
log_very_verbose("Initialised segtype: " REPLICATOR_MODULE);
@@ -785,8 +787,10 @@
segtype->private = NULL;
segtype->flags = SEG_REPLICATOR_DEV;
- if (!lvm_register_segtype(seglib, segtype))
+ if (!lvm_register_segtype(seglib, segtype)) {
+ dm_free(segtype);
return_0;
+ }
log_very_verbose("Initialised segtype: " REPLICATOR_DEV_MODULE);
--- LVM2/lib/thin/thin.c 2012/01/25 09:06:43 1.44
+++ LVM2/lib/thin/thin.c 2012/01/25 21:54:00 1.45
@@ -606,8 +606,10 @@
segtype->flags |= SEG_MONITORED;
# endif /* DMEVENTD */
#endif
- if (!lvm_register_segtype(seglib, segtype))
+ if (!lvm_register_segtype(seglib, segtype)) {
+ dm_free(segtype);
return_0;
+ }
log_very_verbose("Initialised segtype: %s", segtype->name);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-25 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 21:54 LVM2/lib raid/raid.c replicator/replicator.c t zkabelac
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).