]> git.ipfire.org Git - thirdparty/libnl.git/commitdiff
xfrm: fix calling free() with a bad pointer
authorNicolas PLANEL <nicolas.planel@enovance.com>
Tue, 26 Aug 2014 14:23:37 +0000 (10:23 -0400)
committerThomas Haller <thaller@redhat.com>
Tue, 26 Aug 2014 14:52:17 +0000 (16:52 +0200)
sp->sec_ctx->ctx is a zero-length member, so it's already allocated

https://github.com/thom311/libnl/pull/61

Signed-off-by: Thomas Haller <thaller@redhat.com>
lib/xfrm/sp.c

index 76cdc610de9b2e134cffd731b3b3d172815f45e6..74e9484d41cc77a8d59d9b40f110ddcbb07a73db 100644 (file)
@@ -94,7 +94,6 @@ static void xfrm_sp_free_data(struct nl_object *c)
 
        if(sp->sec_ctx)
        {
-               free (sp->sec_ctx->ctx);
                free (sp->sec_ctx);
        }