[PATCH] libmtd: make malloc failures fatal
Artem Bityutskiy
dedekind1 at gmail.com
Sat Oct 2 10:19:58 EDT 2010
On Fri, 2010-10-01 at 13:13 -0400, Mike Frysinger wrote:
> This converts libmtd to the common xalloc helpers and in doing so, makes
> memory allocation failures fatal rather than returning an error to the
> caller. I think this is acceptable behavior.
>
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
> lib/libmtd.c | 26 ++++++--------------------
> lib/libmtd_legacy.c | 8 +-------
> 2 files changed, 7 insertions(+), 27 deletions(-)
I am not 100% sure this is a good idea, but probably for allocations it
is ok - they are so unlikely to fail, and if they do, we are screwed
anyway. But for other situation we should return errors, I think.
Pushed, thanks!
--
Best Regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list