This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=c5d3093cffc47424984e28671d5a0d4661f28128

commit c5d3093cffc47424984e28671d5a0d4661f28128
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Jan 2 14:00:18 2025 +0100

    libdpkg: Do not call varbuf_init() from operator=()
    
    This can be called multiple times, and the varbuf_init() function is
    intended to be called only once, otherwise we will leak memory.
    
    Fixes: commit 19777c0f7fe274e7fdee3da7e428b63e3465dbc3
---
 lib/dpkg/varbuf.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/dpkg/varbuf.h b/lib/dpkg/varbuf.h
index 87714d93e..a4b737af6 100644
--- a/lib/dpkg/varbuf.h
+++ b/lib/dpkg/varbuf.h
@@ -391,7 +391,6 @@ varbuf::trim_prefix(int prefix)
 inline varbuf &
 varbuf::operator=(const varbuf &v)
 {
-       varbuf_init(this, v.used);
        varbuf_set_buf(this, v.buf, v.used);
 
        return *this;

-- 
Dpkg.Org's dpkg

Reply via email to