mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 16:59:03 +03:00
bus: make sure we don't try to malloc 0 bytes
This commit is contained in:
parent
1ca208fb4f
commit
23c6f770cc
@ -1284,7 +1284,7 @@ static int part_make_space(
|
||||
|
||||
part->munmap_this = true;
|
||||
} else {
|
||||
n = realloc(part->data, sz);
|
||||
n = realloc(part->data, MAX(sz, 1u));
|
||||
if (!n) {
|
||||
m->poisoned = true;
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user