util/ectool: Protect against out-of-memory condition
util/ectool: Protect against out-of-memory condition

Found by Coverity Scan

BUG=none
BRANCH=none
TEST=none

Change-Id: I9c29f915a732e8dc762b6ebcdffda6f433e983c2
Signed-off-by: Patrick Georgi <bc411205f21846a74924ee7b489c75617ec76078@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1768652
Reviewed-by: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
Tested-by: Patrick Georgi <bc411205f21846a74924ee7b489c75617ec76078@chromium.org>
Commit-Queue: Patrick Georgi <bc411205f21846a74924ee7b489c75617ec76078@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec