ike-init: Fix error handling if nonceg can't be created
authorTobias Brunner <tobias@strongswan.org>
Tue, 5 May 2015 07:39:11 +0000 (09:39 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 5 May 2015 08:55:13 +0000 (10:55 +0200)
commit59565ebf6051d8c5048c759be3bbcac1b3b3f9e0
tree2cb875193395c95b66ad7c912e3cb7bcce435512
parentd648d61375f6c8e13eb76e322e5423fea393ccc4
ike-init: Fix error handling if nonceg can't be created

Returning FAILED in the constructor is wrong, but returning NULL doesn't work
either as it's currently assumed tasks always can be created.
Therefore, delay this check until we actually try to allocate a nonce.
src/libcharon/sa/ikev2/tasks/ike_init.c