diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-04-04 16:00:49 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-04-04 16:00:49 -0400 |
commit | 46e4690bbd9a4f8d9e7c4f34e34b48f703ad47e0 (patch) | |
tree | 94d800c75ed4a9e11cd5301e171d301b266d4032 /fs/jbd2/commit.c | |
parent | 5b41395fcc0265fc9f193aef9df39ce49d64677c (diff) |
ext4: fix a double free in ext4_register_li_request
In ext4_register_li_request, we malloc a ext4_li_request and
inserts it into ext4_li_info->li_request_list. In case of any
error later, we free it in the end. But if we have some error
in ext4_run_lazyinit_thread, the whole li_request_list will be
dropped and freed in it. So we will double free this ext4_li_request.
This patch just sets elr to NULL after it is inserted to the list
so that the latter kfree won't double free it.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions