[Aptitude-svn-commit] r4372 - in branches/aptitude-0.3/aptitude: .
src/cmdline
Daniel Burrows
dburrows at costa.debian.org
Fri Sep 30 18:10:33 UTC 2005
Author: dburrows
Date: Fri Sep 30 18:10:31 2005
New Revision: 4372
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/cmdline/cmdline_changelog.cc
Log:
Fix memory leaks.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Fri Sep 30 18:10:31 2005
@@ -1,5 +1,9 @@
2005-09-30 Daniel Burrows <dburrows at debian.org>
+ * src/cmdline/cmdline_changelog.cc:
+
+ Kill off some memory leaks.
+
* src/changelog_parse.cc:
Instead of using the description parser to generate formatted
Modified: branches/aptitude-0.3/aptitude/src/cmdline/cmdline_changelog.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/cmdline/cmdline_changelog.cc (original)
+++ branches/aptitude-0.3/aptitude/src/cmdline/cmdline_changelog.cc Fri Sep 30 18:10:31 2005
@@ -106,17 +106,27 @@
temp::name rval;
download_manager::result res;
- res = cmdline_do_download(get_changelog_from_source(pkg, ver, "", pkg,
- sigc::bind(sigc::ptr_fun(set_name),
- &rval)));
+ download_manager *m = get_changelog_from_source(pkg, ver, "", pkg,
+ sigc::bind(sigc::ptr_fun(set_name),
+ &rval));
+ res = cmdline_do_download(m);
+ delete m;
if(res != download_manager::success || !rval.valid())
- res = cmdline_do_download(get_changelog_from_source(pkg, ver, "contrib/foo", pkg,
- sigc::bind(sigc::ptr_fun(set_name), &rval)));
+ {
+ m = get_changelog_from_source(pkg, ver, "contrib/foo", pkg,
+ sigc::bind(sigc::ptr_fun(set_name), &rval));
+ res = cmdline_do_download(m);
+ delete m;
+ }
if(res != download_manager::success || !rval.valid())
- res = cmdline_do_download(get_changelog_from_source(pkg, ver, "non-free/foo", pkg,
- sigc::bind(sigc::ptr_fun(set_name), &rval)));
+ {
+ m = get_changelog_from_source(pkg, ver, "non-free/foo", pkg,
+ sigc::bind(sigc::ptr_fun(set_name), &rval));
+ res = cmdline_do_download(m);
+ delete m;
+ }
if(res != download_manager::success)
return temp::name();
@@ -232,8 +242,12 @@
if(ver.end() && source == cmdline_version_version)
filename = changelog_by_version(package, sourcestr);
else
- cmdline_do_download(get_changelog(ver,
- sigc::bind(sigc::ptr_fun(&set_name), &filename)));
+ {
+ download_manager *m = get_changelog(ver,
+ sigc::bind(sigc::ptr_fun(&set_name), &filename));
+ cmdline_do_download(m);
+ delete m;
+ }
}
else
{
@@ -285,6 +299,8 @@
sigc::bind(sigc::ptr_fun(&set_name), &filename));
cmdline_do_download(m);
+
+ delete m;
}
}
More information about the Aptitude-svn-commit
mailing list