diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/efivars.c | 2 | ||||
-rw-r--r-- | src/shared/util.c | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c index d34d977b9a..0d6ecf52cf 100644 --- a/src/shared/efivars.c +++ b/src/shared/efivars.c @@ -483,7 +483,7 @@ int efi_add_boot_option(uint16_t id, const char *title, devicep->length = offsetof(struct device_path, drive) + sizeof(struct drive_path); devicep->drive.part_nr = part; devicep->drive.part_start = pstart; - devicep->drive.part_size = psize; + devicep->drive.part_size = psize; devicep->drive.signature_type = SIGNATURE_TYPE_GUID; devicep->drive.mbr_type = MBR_TYPE_EFI_PARTITION_TABLE_HEADER; id128_to_efi_guid(part_uuid, devicep->drive.signature); diff --git a/src/shared/util.c b/src/shared/util.c index 311acbb349..1442301cd7 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -4931,11 +4931,15 @@ int bind_remount_recursive(const char *prefix, bool ro) { while ((x = set_steal_first(todo))) { - r = set_consume(done, x); - if (r == -EEXIST) + r = set_put(done, x); + if (r == -EEXIST) { + free(x); continue; - if (r < 0) + } + if (r < 0) { + free(x); return r; + } /* Try to reuse the original flag set, but * don't care for errors, in case of @@ -4945,14 +4949,15 @@ int bind_remount_recursive(const char *prefix, bool ro) { orig_flags &= ~MS_RDONLY; if (mount(NULL, x, NULL, orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) { - /* Deal with mount points that are * obstructed by a later mount */ - if (errno != ENOENT) + if (errno != ENOENT) { + free(x); return -errno; + } } - + free(x); } } } |