Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
dmraid
dmraid-fdleak.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dmraid-fdleak.patch of Package dmraid
Index: libdmraid-events/libdmraid-events.c =================================================================== --- libdmraid-events/libdmraid-events.c.orig 2008-07-18 23:30:05.000000000 +0200 +++ libdmraid-events/libdmraid-events.c 2009-10-05 23:39:07.000000000 +0200 @@ -180,6 +180,7 @@ static int _repopulate(const char* devic } fscanf(fd, "%s", curr->raid_mem[curr->num_sata_drives].major_minor); fclose(fd); + closedir(dir); curr->raid_mem[curr->num_sata_drives].port_num = atoi(dir_ent[i]->d_name); syslog(LOG_INFO, "Added disk %s (%s) port=%i\n", disk, curr->raid_mem[curr->num_sata_drives].major_minor, curr->raid_mem[curr->num_sata_drives].port_num); @@ -969,6 +970,7 @@ int register_device(const char *device, } fscanf(fd, "%s", rv_next->raid_mem[m].major_minor); fclose(fd); + closedir(dir); rv_next->raid_mem[m].port_num = atoi(dir_ent[j]->d_name); m++; break; Index: lib/device/partition.c =================================================================== --- lib/device/partition.c.orig 2009-10-05 23:39:06.000000000 +0200 +++ lib/device/partition.c 2009-10-06 00:19:12.000000000 +0200 @@ -30,12 +30,15 @@ _remove_subset_partitions(struct lib_con /* There is no way to enumerate partitions */ for (part.pno = 1; part.pno <= 256; part.pno++) { if (ioctl(fd, BLKPG, &io) < 0 && errno != ENXIO && - (part.pno < 16 || errno != EINVAL)) + (part.pno < 16 || errno != EINVAL)) { + close(fd); LOG_ERR(lc, 0, "removing part %d from %s: %s\n", part.pno, rd->di->path, strerror(errno)); + } } + close(fd); } return 1; }
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