aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/seg
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-03-02 14:07:40 +0100
committerTobias Brunner <tobias@strongswan.org>2015-03-03 17:05:16 +0100
commita2b400b16b12f0b7e24f0c85b99cae2b47115a8e (patch)
tree8e98906d4a6fc6ea4a165b01fef0b9a9776fabc1 /src/libimcv/seg
parentec57527475579dde7eb5f2efbf953afca0af78da (diff)
downloadstrongswan-a2b400b16b12f0b7e24f0c85b99cae2b47115a8e.tar.bz2
strongswan-a2b400b16b12f0b7e24f0c85b99cae2b47115a8e.tar.xz
seg-env: Destroy base attribute if segmentation is not possible
Diffstat (limited to 'src/libimcv/seg')
-rw-r--r--src/libimcv/seg/seg_env.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libimcv/seg/seg_env.c b/src/libimcv/seg/seg_env.c
index 1605c8414..f38419248 100644
--- a/src/libimcv/seg/seg_env.c
+++ b/src/libimcv/seg/seg_env.c
@@ -219,6 +219,7 @@ seg_env_t *seg_env_create(uint32_t base_attr_id, pa_tnc_attr_t *base_attr,
if (max_seg_size < PA_TNC_ATTR_HEADER_SIZE ||
max_seg_size >= PA_TNC_ATTR_HEADER_SIZE + value.len)
{
+ base_attr->destroy(base_attr);
return NULL;
}