dummyflasher.c: Move `flashchip_contents` allocation

Place `flashchip_contents` allocation next to the code that initialises
the newly-allocated buffer. This also avoids leaking it if the handling
of `spi_status` fails.

Change-Id: Ie907ac88dfe4ca018c97d9ce6ce042b4ffacf36a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/54908
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71362
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
1 file changed