fix potential 'cannot-happen' memory leak

Submitted by:	"Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>
Reviewed by:	itojun
This commit is contained in:
ume 2004-01-13 05:32:12 +00:00
parent d94f2b477c
commit fca4bcad4d

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;
/*