Fix selfcheck of various arrays.

Stefan Reinauer has reported ridiculous NULL checks for arrays in our
self_check function found by Coverity (CID1130005). This patch removes
the useless checks but keeps and fixes the one responsible for the
flashchips array by exporting the array size in a new constant.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

git-svn-id: svn://flashrom.org/flashrom/trunk@1799 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Fix various tiny problems in verify_range().

First of all, fix CID1130010: Resource leak as reported by Stefan Reinauer.
Alternatively to Stefan's approach, just move the malloc() out of the scope.

Additionally, get rid of an unnecessary exit(1) and correctly return -1 in all
error cases as documented.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>

git-svn-id: svn://flashrom.org/flashrom/trunk@1800 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1