Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmpathutil/libmpathutil.version | 1 + libmpathutil/util.c | 5 +++++ libmpathutil/util.h | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libmpathutil/libmpathutil.version b/libmpathutil/libmpathutil.version index fb92f72..14aa083 100644 --- a/libmpathutil/libmpathutil.version +++ b/libmpathutil/libmpathutil.version @@ -51,6 +51,7 @@ global: append_strbuf_str__; append_strbuf_quoted; basenamecpy; + cleanup_bitfield; cleanup_charp; cleanup_fclose; cleanup_fd_ptr; diff --git a/libmpathutil/util.c b/libmpathutil/util.c index 1255974..38e984f 100644 --- a/libmpathutil/util.c +++ b/libmpathutil/util.c @@ -337,6 +337,11 @@ void cleanup_fclose(void *p) fclose(p); } +void cleanup_bitfield(struct bitfield **p) +{ + free(*p); +} + struct bitfield *alloc_bitfield(unsigned int maxbit) { unsigned int n; diff --git a/libmpathutil/util.h b/libmpathutil/util.h index df7f91e..3799fd4 100644 --- a/libmpathutil/util.h +++ b/libmpathutil/util.h @@ -146,5 +146,5 @@ static inline void clear_bit_in_bitfield(unsigned int bit, struct bitfield *bf) void cleanup_charp(char **p); void cleanup_ucharp(unsigned char **p); void cleanup_udev_device(struct udev_device **udd); - +void cleanup_bitfield(struct bitfield **p); #endif /* UTIL_H_INCLUDED */ -- 2.47.0