"e2fsck: Can't allocate dx_block info array"
is only so helpful - it'd be nice to know how much it tried to allocate.
In particular, since I think malloc(0) can return NULL,
it'd be nice to know if maybe we passed in an uninitialized (or
0-initialized) size.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
#endif
ret = malloc(size);
if (!ret) {
- sprintf(buf, "Can't allocate %s\n", description);
+ sprintf(buf, "Can't allocate %u bytes for %s\n",
+ size, description);
fatal_error(ctx, buf);
}
memset(ret, 0, size);