1a31b20cd8
Since fastmap we gained do_sync_erase(). This function can return an error
and its error handling isn't obvious. First the memory allocation for
struct ubi_work can fail and as such struct ubi_wl_entry is leaked.
However if the memory allocation succeeds then the tail function takes
care of the struct ubi_wl_entry. A free here could result in a double
free.
To make the error handling simpler, I split the tail function into one
piece which does the work and another which frees the struct ubi_work
which is passed as argument. As result do_sync_erase() can keep the
struct on stack and we get rid of one error source.
Cc: <stable@vger.kernel.org>
Fixes:
|
||
---|---|---|
.. | ||
attach.c | ||
block.c | ||
build.c | ||
cdev.c | ||
debug.c | ||
debug.h | ||
eba.c | ||
fastmap-wl.c | ||
fastmap.c | ||
gluebi.c | ||
io.c | ||
kapi.c | ||
Kconfig | ||
Makefile | ||
misc.c | ||
ubi-media.h | ||
ubi.h | ||
upd.c | ||
vmt.c | ||
vtbl.c | ||
wl.c | ||
wl.h |