mirror of https://github.com/dynup/kpatch
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:
parent
a31a31f184
commit
a41ce8d409
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue