projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41c7700
)
x86/ucode/AMD: make freeing of old ucode conditional
author
Chao Gao
<chao.gao@intel.com>
Fri, 30 Aug 2019 08:22:55 +0000
(10:22 +0200)
committer
Jan Beulich
<jbeulich@suse.com>
Fri, 30 Aug 2019 08:22:55 +0000
(10:22 +0200)
It is certain to be NULL at least the first time through.
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/microcode_amd.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/microcode_amd.c
b/xen/arch/x86/microcode_amd.c
index 306978457b855ab40a3adda7fce2187e5de81196..9b743307c46286434dc6d6bef027122654e6ad7b 100644
(file)
--- a/
xen/arch/x86/microcode_amd.c
+++ b/
xen/arch/x86/microcode_amd.c
@@
-552,9
+552,12
@@
static int cpu_request_microcode(unsigned int cpu, const void *buf,
mc_old = mc_amd;
}
- xfree(mc_old->mpb);
- xfree(mc_old->equiv_cpu_table);
- xfree(mc_old);
+ if ( mc_old )
+ {
+ xfree(mc_old->mpb);
+ xfree(mc_old->equiv_cpu_table);
+ xfree(mc_old);
+ }
out:
#if CONFIG_HVM