xen: fix usage of kern_getenv in PVH code
The value returned by kern_getenv should be freed using freeenv. Reported by: Coverity CID: 1248852 Sponsored by: Citrix Systems R&D
This commit is contained in:
parent
79512487f6
commit
040f3ac494
@ -306,11 +306,14 @@ static void
|
||||
xen_pv_set_boothowto(void)
|
||||
{
|
||||
int i;
|
||||
char *env;
|
||||
|
||||
/* get equivalents from the environment */
|
||||
for (i = 0; howto_names[i].ev != NULL; i++) {
|
||||
if (kern_getenv(howto_names[i].ev) != NULL)
|
||||
if ((env = kern_getenv(howto_names[i].ev)) != NULL) {
|
||||
boothowto |= howto_names[i].mask;
|
||||
freeenv(env);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user