diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-10-31 15:44:54 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-10-31 23:08:11 +0100 |
commit | 2865561eaa4c3ef8d95b8ec4e02ed77e0d639564 (patch) | |
tree | 3dbecbbe4cbc11b777b027fa68d609339cf28470 /src/basic | |
parent | coredump: parse rlimit field at same place as other fields (diff) | |
download | systemd-2865561eaa4c3ef8d95b8ec4e02ed77e0d639564.tar.xz systemd-2865561eaa4c3ef8d95b8ec4e02ed77e0d639564.zip |
coredump: move to _cleanup_ for destroying iovw object
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/iovec-wrapper.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/iovec-wrapper.h b/src/basic/iovec-wrapper.h index 05e220c1d0..0c6d760a73 100644 --- a/src/basic/iovec-wrapper.h +++ b/src/basic/iovec-wrapper.h @@ -19,6 +19,10 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct iovec_wrapper*, iovw_free_free); void iovw_free_contents(struct iovec_wrapper *iovw, bool free_vectors); +static inline void iovw_done_free(struct iovec_wrapper *iovw) { + iovw_free_contents(iovw, true); +} + int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len); static inline int iovw_consume(struct iovec_wrapper *iovw, void *data, size_t len) { /* Move data into iovw or free on error */ |