coredump: use a cleanup handler for destroying iovw objects

This commit is contained in:
Lennart Poettering
2023-08-10 12:10:47 +02:00
parent 85ec1b6efa
commit 6257e2fb1a
2 changed files with 8 additions and 9 deletions
+3
View File
@@ -93,6 +93,9 @@ struct iovec_wrapper {
struct iovec_wrapper *iovw_new(void);
struct iovec_wrapper *iovw_free(struct iovec_wrapper *iovw);
struct iovec_wrapper *iovw_free_free(struct iovec_wrapper *iovw);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct iovec_wrapper*, iovw_free_free);
void iovw_free_contents(struct iovec_wrapper *iovw, bool free_vectors);
int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len);