calls on pf data to explicit_bzero().
ok mikeb@
-/* $OpenBSD: config.c,v 1.37 2015/08/21 11:59:27 reyk Exp $ */
+/* $OpenBSD: config.c,v 1.38 2015/10/15 18:40:38 mmcc Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
ibuf_release(sa->sa_rcert.id_buf);
ibuf_release(sa->sa_eap.id_buf);
- if (sa->sa_eapid != NULL)
- free(sa->sa_eapid);
+ free(sa->sa_eapid);
ibuf_release(sa->sa_eapmsk);
free(sa);
int
config_getocsp(struct iked *env, struct imsg *imsg)
{
- if (env->sc_ocsp_url)
- free(env->sc_ocsp_url);
+ free(env->sc_ocsp_url);
if (IMSG_DATA_SIZE(imsg) > 0)
env->sc_ocsp_url = get_string(imsg->data, IMSG_DATA_SIZE(imsg));
else
-/* $OpenBSD: iked.c,v 1.25 2015/08/21 11:59:27 reyk Exp $ */
+/* $OpenBSD: iked.c,v 1.26 2015/10/15 18:40:38 mmcc Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
if (IMSG_DATA_SIZE(imsg) > 0)
str = get_string(imsg->data, IMSG_DATA_SIZE(imsg));
parent_reload(env, 0, str);
- if (str != NULL)
- free(str);
+ free(str);
break;
case IMSG_OCSP_FD:
ocsp_connect(env);
-/* $OpenBSD: ikev2.c,v 1.125 2015/10/02 16:13:43 reyk Exp $ */
+/* $OpenBSD: ikev2.c,v 1.126 2015/10/15 18:40:38 mmcc Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
int ret = -1;
size_t len;
- if (sa->sa_tag != NULL)
- free(sa->sa_tag);
+ free(sa->sa_tag);
sa->sa_tag = NULL;
format = sa->sa_policy->pol_tag;
-/* $OpenBSD: ikev2_msg.c,v 1.43 2015/08/21 11:59:27 reyk Exp $ */
+/* $OpenBSD: ikev2_msg.c,v 1.44 2015/10/15 18:40:38 mmcc Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
}
done:
- if (psk != NULL)
- free(psk);
+ free(psk);
dsa_free(dsa);
return (ret);
ret = 0;
done:
- if (psk != NULL)
- free(psk);
+ free(psk);
dsa_free(dsa);
return (ret);
-/* $OpenBSD: ikev2_pld.c,v 1.54 2015/10/01 13:57:29 sthen Exp $ */
+/* $OpenBSD: ikev2_pld.c,v 1.55 2015/10/15 18:40:38 mmcc Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
}
done:
- if (localspi)
- free(localspi);
- if (peersas)
- free(peersas);
+ free(localspi);
+ free(peersas);
ibuf_release(resp);
return (ret);
}
-/* $OpenBSD: pfkey.c,v 1.45 2015/08/26 02:09:29 jsg Exp $ */
+/* $OpenBSD: pfkey.c,v 1.46 2015/10/15 18:40:38 mmcc Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
ret = pfkey_write(sd, &smsg, iov, iov_cnt, NULL, NULL);
- if (sa_srcid)
- free(sa_srcid);
- if (sa_dstid)
- free(sa_dstid);
+ free(sa_srcid);
+ free(sa_dstid);
return (ret);
}
log_debug("%s: last_used %llu", __func__, *last_used);
done:
- bzero(data, n);
+ explicit_bzero(data, n);
free(data);
return (ret);
}
log_debug("%s: spi 0x%08x", __func__, *spip);
done:
- bzero(data, n);
+ explicit_bzero(data, n);
free(data);
return (ret);
}