aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorMiao Xie <[email protected]>2013-02-07 06:02:44 +0000
committerJosef Bacik <[email protected]>2013-02-20 12:59:41 -0500
commit8696c53304f16fde9368b9d5c89a5acb4a815d4c (patch)
tree856777de858d660b2d1c8c38facd5197407ba668 /tools/perf/util/trace-event-scripting.c
parent2b8195bb5717729e4e94ab4ad73a543feaafb0a2 (diff)
Btrfs: fix memory leak of pending_snapshot->inherit
The argument "inherit" of btrfs_ioctl_snap_create_transid() was assigned to NULL during we created the snapshots, so we didn't free it though we called kfree() in the caller. But since we are sure the snapshot creation is done after the function - btrfs_ioctl_snap_create_transid() - completes, it is safe that we don't assign the pointer "inherit" to NULL, and just free it in the caller of btrfs_ioctl_snap_create_transid(). In this way, the code can become more readable. Reported-by: Alex Lyakas <[email protected]> Cc: Arne Jansen <[email protected]> Signed-off-by: Miao Xie <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions