Fixed little memory leak in the UEFI build that would make the bootloader crash on systems with larger disks
This commit is contained in:
parent
ffc624bdd7
commit
409c05c42d
@ -648,15 +648,18 @@ fail:
|
|||||||
|
|
||||||
volume_index[volume_index_i++] = block;
|
volume_index[volume_index_i++] = block;
|
||||||
|
|
||||||
|
struct volume _p;
|
||||||
for (int part = 0; ; part++) {
|
for (int part = 0; ; part++) {
|
||||||
struct volume *p = ext_mem_alloc(sizeof(struct volume));
|
|
||||||
int ret = part_get(p, block, part);
|
int ret = part_get(&_p, block, part);
|
||||||
|
|
||||||
if (ret == END_OF_TABLE || ret == INVALID_TABLE)
|
if (ret == END_OF_TABLE || ret == INVALID_TABLE)
|
||||||
break;
|
break;
|
||||||
if (ret == NO_PARTITION)
|
if (ret == NO_PARTITION)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
struct volume *p = ext_mem_alloc(sizeof(struct volume));
|
||||||
|
memcpy(p, &_p, sizeof(struct volume));
|
||||||
volume_index[volume_index_i++] = p;
|
volume_index[volume_index_i++] = p;
|
||||||
|
|
||||||
block->max_partition++;
|
block->max_partition++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user