1
0
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:
Zbigniew Jędrzejewski-Szmek 2013-10-13 17:40:34 -04:00
parent 1ca208fb4f
commit 23c6f770cc

View File

@ -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;