diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-07 18:06:52 -0500 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-01-07 18:06:52 -0500 |
| commit | bc351f07260533cc1b3987339551decd00ddd52e (patch) | |
| tree | 3b6f396681f08dacc8dd24ce2c586ea2195e825d /kernel/fail_function.c | |
| parent | d45f89f7437d0f2c8275b4434096164db106384d (diff) | |
| parent | 9aa418792f5f11ef5d6f72265e1f8ae07efd5784 (diff) | |
Merge branch 'kvm-master' into kvm-next
Fixes to get_mmio_spte, destined to 5.10 stable branch.
Diffstat (limited to 'kernel/fail_function.c')
| -rw-r--r-- | kernel/fail_function.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/fail_function.c b/kernel/fail_function.c index 63b349168da7..b0b1ad93fa95 100644 --- a/kernel/fail_function.c +++ b/kernel/fail_function.c @@ -253,7 +253,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer, if (copy_from_user(buf, buffer, count)) { ret = -EFAULT; - goto out; + goto out_free; } buf[count] = '\0'; sym = strstrip(buf); @@ -307,8 +307,9 @@ static ssize_t fei_write(struct file *file, const char __user *buffer, ret = count; } out: - kfree(buf); mutex_unlock(&fei_lock); +out_free: + kfree(buf); return ret; } |
