diff options
-rw-r--r-- | fs/coredump.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/coredump.c b/fs/coredump.c index 4b3c75732c97..3224dee44d30 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -1134,8 +1134,10 @@ int dump_vma_snapshot(struct coredump_params *cprm, int *vma_count, mmap_write_unlock(mm); - if (WARN_ON(i != *vma_count)) + if (WARN_ON(i != *vma_count)) { + kvfree(*vma_meta); return -EFAULT; + } *vma_data_size_ptr = vma_data_size; return 0; |