mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Address coverity warnings (CID 1439133/1439132).
>>>> CID 1439133: Null pointer dereferences (REVERSE_INULL) >>>> Null-checking "fields" suggests that it may be null, but it >>>> has already been dereferenced on all paths leading to the check. >>>> CID 1439132: Null pointer dereferences (REVERSE_INULL) >>>> Null-checking "fields" suggests that it may be null, but it >>>> has already been dereferenced on all paths leading to the check.
This commit is contained in:
parent
a52d5d5309
commit
34a2cbb249
@ -1524,10 +1524,9 @@ parse_auth_file_content(const char *client_key_str)
|
||||
if (seckey_b32) {
|
||||
memwipe(seckey_b32, 0, strlen(seckey_b32));
|
||||
}
|
||||
if (fields) {
|
||||
SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
|
||||
smartlist_free(fields);
|
||||
}
|
||||
tor_assert(fields);
|
||||
SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
|
||||
smartlist_free(fields);
|
||||
return auth;
|
||||
}
|
||||
|
||||
|
@ -1192,10 +1192,9 @@ parse_authorized_client(const char *client_key_str)
|
||||
if (pubkey_b32) {
|
||||
memwipe(pubkey_b32, 0, strlen(pubkey_b32));
|
||||
}
|
||||
if (fields) {
|
||||
SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
|
||||
smartlist_free(fields);
|
||||
}
|
||||
tor_assert(fields);
|
||||
SMARTLIST_FOREACH(fields, char *, s, tor_free(s));
|
||||
smartlist_free(fields);
|
||||
return client;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user