test_firmware: fix memory leak in test_firmware_init()