}
env = palacios_alloc(sizeof(struct env_data));
- if (IS_ERR(env)) {
+ if (!env) {
ERROR("Palacios Error: could not allocate space for environment data\n");
return -EFAULT;
}
//DEBUG("Palacios: Allocating space for %u env var string ptrs...\n", env->num_strings);
env->strings = palacios_alloc(env->num_strings*sizeof(char*));
- if (IS_ERR(env->strings)) {
+ if (!(env->strings)) {
ERROR("Palacios Error: could not allocate space for env var strings\n");
return -EFAULT;
}
for (i = 0; i < env->num_strings; i++) {
char * tmp = palacios_alloc(MAX_STRING_LEN);
- if (IS_ERR(tmp)) {
+ if (!(tmp)) {
ERROR("Palacios Error: could not allocate space for env var string #%d\n", i);
return -EFAULT;
}
static int guest_deinit_env_inject (struct v3_guest * guest, void * vm_data) {
free_inject_data();
+ remove_guest_ctrl(guest, V3_VM_ENV_INJECT);
return 0;
}