UBI: fix use-after-free on error path
UBI: fix use-after-free on error path

When we fail to erase a PEB, we free the corresponding erase entry object,
but then re-schedule this object if the error code was something like -EAGAIN.
Obviously, it is a bug to use the object after we have freed it.

Reported-by: Emese Revfy <9a4f18db6b8f229be46c4f9a8af45e6bd8014b17@gmail.com>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@kernel.org [v2.6.23+]
Signed-off-by: Artem Bityutskiy <2f96f8cd3e2780a209d0ab27d1b44624d0019d3f@linux.intel.com>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas