Skip to contentSkip to conversation

master - scan: clean exit for alloc failure

PATCH David Teigland 1 participant 1 message Jun 1, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7b5b1a9b6f03e9452c7a9d602247e61e808c316b
Commit:        7b5b1a9b6f03e9452c7a9d602247e61e808c316b
Parent:        0625c7f372a8481e21752b1fc930984ba7c900db
Author:        David Teigland <[email protected]>
AuthorDate:    Fri Jun 1 10:40:28 2018 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Fri Jun 1 13:15:22 2018 -0500

scan: clean exit for alloc failure

---
 lib/label/label.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/label/label.c +1 -1
index 427caa9..f36c706 100644
@@ -832,7 +832,7 @@ int label_scan(struct cmd_context *cmd)
 
 	while ((dev = dev_iter_get(iter))) {
 		if (!(devl = dm_zalloc(sizeof(*devl))))
-			return 0;
+			continue;
 		devl->dev = dev;
 		dm_list_add(&all_devs, &devl->list);