ptunit: destroy only initialized test fixtures

Do not call a fixture's destructor if initialization failed.

This avoids issues with destroying not-yet-initialized fields.  We rather leak
already-initialized fields.  The initializer is really expected to destroy those
before reporting the fail.  But that doesn't really matter for our tests.

Change-Id: I5bb1af5e50a4f7a42576d7d1bf4a0af22ee1e885
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
1 file changed