From a41ce8d409548d4f1dc209547e0aeed11901d936 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Fri, 17 Oct 2014 13:24:44 +0200 Subject: [PATCH] Fix memory leak on dest buffer on early return path dest is allocated but not freed on an early return path where dest is not used Signed-off-by: Colin Ian King --- kpatch-build/create-diff-object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index dcdc198..a16fa49 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -1838,6 +1838,7 @@ void kpatch_regenerate_special_section(struct kpatch_elf *kelf, /* no changed or global functions referenced */ sec->status = sec->base->status = SAME; sec->include = sec->base->include = 0; + free(dest); return; }