aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpiutil.c
diff options
context:
space:
mode:
authorLeo Martins <[email protected]>2024-09-03 11:19:05 -0700
committerDavid Sterba <[email protected]>2024-09-10 16:51:22 +0200
commit4c74a32ad323f89ac99b0f147e331f6ead100efa (patch)
tree2225f15fd8d04d104df1030e841e3df8e6dab54e /lib/crypto/mpi/mpiutil.c
parentab6eac7c9111b75fca243e2590a17b55e96e9d31 (diff)
btrfs: DEFINE_FREE for struct btrfs_path
Add a DEFINE_FREE for struct btrfs_path. This defines a function that can be called using the __free attribute. Define a macro BTRFS_PATH_AUTO_FREE to make the declaration of an auto freeing path very clear. The intended use is to define the auto free of path in cases where the path is allocated somewhere at the beginning and freed either on all error paths or at the end of the function. int func() { BTRFS_PATH_AUTO_FREE(path); if (...) return -ERROR; path = alloc_path(); ... if (...) return -ERROR; ... return 0; } Signed-off-by: Leo Martins <[email protected]> [ update changelog ] Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions