aboutsummaryrefslogtreecommitdiff
path: root/sound/i2c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-11-23 07:25:49 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-11-23 07:25:49 -0500
commit2de770a406b06dfc619faabbf5d85c835ed3f2e1 (patch)
tree4607c5bfc0f66bfc6067e673ac33e76e42aa9318 /sound/i2c
parent156171c71a0dc4bce12b4408bb1591f8fe32dc1a (diff)
ext4: fix potential buffer head leak when add_dirent_to_buf() returns ENOSPC
Previously add_dirent_to_buf() did not free its passed-in buffer head in the case of ENOSPC, since in some cases the caller still needed it. However, this led to potential buffer head leaks since not all callers dealt with this correctly. Fix this by making simplifying the freeing convention; now add_dirent_to_buf() *never* frees the passed-in buffer head, and leaves that to the responsibility of its caller. This makes things cleaner and easier to prove that the code is neither leaking buffer heads or calling brelse() one time too many. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Curt Wohlgemuth <curtw@google.com> Cc: stable@kernel.org
Diffstat (limited to 'sound/i2c')
0 files changed, 0 insertions, 0 deletions