diff options
Diffstat (limited to 'src/utils/wpabuf.c')
-rw-r--r-- | src/utils/wpabuf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/wpabuf.c b/src/utils/wpabuf.c index b257b365c756c..7aafa0a5169ba 100644 --- a/src/utils/wpabuf.c +++ b/src/utils/wpabuf.c @@ -205,6 +205,15 @@ void wpabuf_free(struct wpabuf *buf) } +void wpabuf_clear_free(struct wpabuf *buf) +{ + if (buf) { + os_memset(wpabuf_mhead(buf), 0, wpabuf_len(buf)); + wpabuf_free(buf); + } +} + + void * wpabuf_put(struct wpabuf *buf, size_t len) { void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf); |