diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-27 12:01:32 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-27 12:01:32 -0500 |
commit | 03498f946430c1fbb411f94af7f9a366f4a7cd51 (patch) | |
tree | 225f584fbe5bcb8f72ebc5c624e1a8d9e8fa235c /libbcachefs/util.h | |
parent | b1a2ab6eeffc62d32f648d9267dc101da77567d1 (diff) |
Update bcachefs sources to 04036b4910 bcachefs: Fix a memory leak
Diffstat (limited to 'libbcachefs/util.h')
-rw-r--r-- | libbcachefs/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbcachefs/util.h b/libbcachefs/util.h index 25ae98cc..4095df2f 100644 --- a/libbcachefs/util.h +++ b/libbcachefs/util.h @@ -300,6 +300,10 @@ static inline void pr_indent_push(struct printbuf *buf, unsigned spaces) static inline void pr_indent_pop(struct printbuf *buf, unsigned spaces) { + if (buf->last_newline + buf->indent == buf->pos) { + buf->pos -= spaces; + buf->buf[buf->pos] = 0; + } buf->indent -= spaces; } |