-/* $OpenBSD: relayd.c,v 1.168 2017/05/28 10:39:15 benno Exp $ */
+/* $OpenBSD: relayd.c,v 1.169 2017/05/31 04:14:34 jsg Exp $ */
/*
* Copyright (c) 2007 - 2016 Reyk Floeter <reyk@openbsd.org>
ca_pkey->pkey = pkey;
if (strlcpy(ca_pkey->pkey_hash, hash, sizeof(ca_pkey->pkey_hash)) >=
- sizeof(ca_pkey->pkey_hash))
+ sizeof(ca_pkey->pkey_hash)) {
+ free(ca_pkey);
return (NULL);
+ }
TAILQ_INSERT_TAIL(env->sc_pkeys, ca_pkey, pkey_entry);