mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Fix leaked exception
This commit is contained in:
parent
da6b90528e
commit
4074b9f8d3
1 changed files with 4 additions and 1 deletions
|
@ -97,7 +97,9 @@ static inline void testIndent(void)
|
|||
|
||||
/* A variable set whenever a test macro is executed. This contains
|
||||
* the exception which terminated the test macro, or nil if no exception
|
||||
* was raised.
|
||||
* was raised. This is destroyed at the end of a set (to avoid leaking)
|
||||
* but if you run tests outside sets you should explicitly destroy it
|
||||
* when finished.
|
||||
*/
|
||||
static NSException *testRaised __attribute__((unused)) = nil;
|
||||
|
||||
|
@ -556,6 +558,7 @@ static void testStart()
|
|||
fprintf(stderr, "%s:%d ... %s\n", __FILE__, __LINE__, _save_set); \
|
||||
free(_save_set); \
|
||||
testHopeful = _save_hopeful; \
|
||||
DESTROY(testRaised); \
|
||||
}
|
||||
|
||||
/* The NEED macro takes a test macro as an argument and breaks out of a set
|
||||
|
|
Loading…
Reference in a new issue