diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-20 11:04:44 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-20 11:06:31 -0500 |
commit | 68c21860e32ca04d77c2bfbf7576b96de5110f59 (patch) | |
tree | 949771a57da569ec082f226252b6853232c25623 | |
parent | 3bb29dd707fbc825501c30ed9a6fe4aecdf4fd22 (diff) | |
download | tor-68c21860e32ca04d77c2bfbf7576b96de5110f59.tar.gz tor-68c21860e32ca04d77c2bfbf7576b96de5110f59.zip |
Add another assertion to check for 24086 root causes
In cdm_diff_ht_set_status(), we shouldn't have been allowing the
status CDM_DIFF_PRESENT to be set if there wasn't actually a handle.
-rw-r--r-- | src/or/consdiffmgr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c index 8c25ff201c..c5f55b6f3f 100644 --- a/src/or/consdiffmgr.c +++ b/src/or/consdiffmgr.c @@ -283,6 +283,10 @@ cdm_diff_ht_set_status(consensus_flavor_t flav, int status, consensus_cache_entry_handle_t *handle) { + if (handle == NULL) { + tor_assert_nonfatal(status != CDM_DIFF_PRESENT); + } + struct cdm_diff_t search, *ent; memset(&search, 0, sizeof(cdm_diff_t)); search.flavor = flav; |