Fix probable NULL dereference
This commit is contained in:
parent
44790d35ba
commit
df1d8b0518
|
@ -187,9 +187,9 @@ gemini_open(struct gemini *g, const char *url)
|
|||
warnx("TLS Error: %s", tls_error(g->tls));
|
||||
goto err;
|
||||
}
|
||||
if ((hash = tls_peer_cert_hash(g->tls)) == NULL)
|
||||
goto err;
|
||||
if (g->tofufile != NULL) {
|
||||
if ((hash = tls_peer_cert_hash(g->tls)) == NULL)
|
||||
goto err;
|
||||
if (g->tofufd < 0 && (g->tofufd = open(g->tofufile,
|
||||
((g->flags & GEMINI_TOFU_WRITE) ?
|
||||
(O_RDWR | O_CREAT) : O_RDONLY) |
|
||||
|
|
Loading…
Reference in New Issue