fix null derference (coverity 1127056)

This commit is contained in:
Vincent Sanders 2013-11-27 21:36:56 +00:00
parent 36bf4547c6
commit 75ec87cbca

View File

@ -39,8 +39,10 @@ gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
void *cbpw)
{
monkey_cert_t *m4t = calloc(sizeof(*m4t), 1);
if (m4t == NULL)
if (m4t == NULL) {
cb(false, cbpw);
return;
}
m4t->cb = cb;
m4t->pw = cbpw;
m4t->num = cert_ctr++;