Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nick Mathewson
Tor
Commits
9eeff921
Commit
9eeff921
authored
Mar 12, 2019
by
teor
Browse files
sr: BUG() on NULL sr_state before doing a state_query_*()
Part of #29706.
parent
0cca5541
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/or/shared_random_state.c
View file @
9eeff921
...
...
@@ -857,6 +857,9 @@ state_query_get_commit(const char *rsa_fpr)
static
void
*
state_query_get_
(
sr_state_object_t
obj_type
,
const
void
*
data
)
{
if
(
BUG
(
!
sr_state
))
return
NULL
;
void
*
obj
=
NULL
;
switch
(
obj_type
)
{
...
...
@@ -890,6 +893,9 @@ state_query_get_(sr_state_object_t obj_type, const void *data)
static
void
state_query_put_
(
sr_state_object_t
obj_type
,
void
*
data
)
{
if
(
BUG
(
!
sr_state
))
return
;
switch
(
obj_type
)
{
case
SR_STATE_OBJ_COMMIT
:
{
...
...
@@ -939,6 +945,9 @@ state_query_put_(sr_state_object_t obj_type, void *data)
static
void
state_query_del_all_
(
sr_state_object_t
obj_type
)
{
if
(
BUG
(
!
sr_state
))
return
;
switch
(
obj_type
)
{
case
SR_STATE_OBJ_COMMIT
:
{
...
...
@@ -967,6 +976,9 @@ state_query_del_(sr_state_object_t obj_type, void *data)
{
(
void
)
data
;
if
(
BUG
(
!
sr_state
))
return
;
switch
(
obj_type
)
{
case
SR_STATE_OBJ_PREVSRV
:
tor_free
(
sr_state
->
previous_srv
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment