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 <colin.king@canonical.com>
This commit is contained in:
Colin Ian King 2014-10-17 13:24:44 +02:00
parent a31a31f184
commit a41ce8d409
1 changed files with 1 additions and 0 deletions

View File

@ -1838,6 +1838,7 @@ void kpatch_regenerate_special_section(struct kpatch_elf *kelf,
/* no changed or global functions referenced */ /* no changed or global functions referenced */
sec->status = sec->base->status = SAME; sec->status = sec->base->status = SAME;
sec->include = sec->base->include = 0; sec->include = sec->base->include = 0;
free(dest);
return; return;
} }