I've looked at the changes done to file auto-apt-pkgcdb.c in this commit:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/auto-apt/trusty/revision/6#auto-apt-pkgcdb.c
There is clearly a memory leak in the "while" loop that starts in line 220.
The get_line() function allocates and returns a pointer to a character array (a
new allocation for each invocation).
Inside the loop, in line 225, that function is called ("buf =
get_line(stdin);"), and the pointer stored is in "buf".
However, the related free(buf) function is only called outside of the loop. So,
only the last allocation is freed.
The free(buf) call must be moved to inside the "while" loop!
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1300987
Title:
/usr/lib/auto-apt/auto-apt-pkgdcb consumes over 100% RAM on 0.3.23
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/auto-apt/+bug/1300987/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs