fix potential 'cannot-happen' memory leak

Submitted by:	"Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>
Reviewed by:	itojun
This commit is contained in:
Hajimu UMEMOTO 2004-01-13 05:32:12 +00:00
parent 2333afc31e
commit 7495684aca

View File

@ -1311,8 +1311,11 @@ ipsec_deepcopy_policy(src)
struct ipsecrequest *r;
struct secpolicy *dst;
if (src == NULL)
return NULL;
dst = key_newsp(0);
if (src == NULL || dst == NULL)
if (dst == NULL)
return NULL;
/*