Fix memset() with wrong size in cb_free
@@ -19,7 +19,7 @@ void cb_init(circular_buffer *cb, size_t capacity, size_t sz) {
void cb_free(circular_buffer *cb) {
kfree(cb->buffer);
- memset(cb, 0, sizeof(cb));
+ memset(cb, 0, sizeof(circular_buffer));
}
void cb_push_back(circular_buffer *cb, const char *item) {
