Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
device-mapper.18094
bug-1164718_22-cov-release-iterator-on-error-pa...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-1164718_22-cov-release-iterator-on-error-path.patch of Package device-mapper.18094
From 23478d9d2161d1233d0dde1ca40c81d47292bd87 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac <zkabelac@redhat.com> Date: Fri, 28 Jun 2019 13:26:11 +0200 Subject: [PATCH] cov: release iterator on error path Another missed release on error path. --- lib/label/label.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/label/label.c b/lib/label/label.c index a535bd4d3..bc31a7c67 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -912,7 +912,7 @@ int label_scan(struct cmd_context *cmd) if (!scan_bcache) { if (!_setup_bcache(dm_list_size(&all_devs))) - return 0; + return_0; } _scan_list(cmd, cmd->full_filter, &all_devs, NULL); @@ -987,8 +987,11 @@ int label_scan_pvscan_all(struct cmd_context *cmd, struct dm_list *scan_devs) } while ((dev = dev_iter_get(iter))) { - if (!(devl = dm_zalloc(sizeof(*devl)))) + if (!(devl = dm_zalloc(sizeof(*devl)))) { + log_error("Failed to allocated device list."); + dev_iter_destroy(iter); return 0; + } devl->dev = dev; dm_list_add(&all_devs, &devl->list); @@ -1013,7 +1016,7 @@ int label_scan_pvscan_all(struct cmd_context *cmd, struct dm_list *scan_devs) if (!scan_bcache) { if (!_setup_bcache(dm_list_size(&all_devs))) - return 0; + return_0; } _scan_list(cmd, cmd->lvmetad_filter, &all_devs, NULL); -- 2.24.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor