diff options
| author | William Ahern <[email protected]> | 2016-02-26 20:59:53 -0800 |
|---|---|---|
| committer | William Ahern <[email protected]> | 2016-02-26 20:59:53 -0800 |
| commit | 26392eee636964ac7ddd9c4f694dcf934981a04d (patch) | |
| tree | ea36e9d5a723e3b18b13d63a8d2cae42406d183c | |
| parent | 51e9aae0c12e7bea45d9d18a1a7282aee22ba557 (diff) | |
fix use-after-free in test-timeout.c
| -rw-r--r-- | test-timeout.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test-timeout.c b/test-timeout.c index 7f31008..47582e0 100644 --- a/test-timeout.c +++ b/test-timeout.c @@ -206,14 +206,16 @@ static int check_randomized(const struct rand_cfg *cfg) if (cfg->finalize > 1) { if (timeouts_get(tos)) FAIL(); + TIMEOUTS_FOREACH(to, tos, TIMEOUTS_ALL) + FAIL(); } } rv = 0; done: + if (tos) timeouts_close(tos); if (t) free(t); if (timeouts) free(timeouts); - if (tos) timeouts_close(tos); if (fired) free(fired); if (deleted) free(deleted); return rv; |
