projects
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c753eec
)
Initialize history_out always with NULL so apt will not segfault later
author
David Kalnischkies
<kalnischkies@gmail.com>
Sat, 3 Apr 2010 15:57:41 +0000
(17:57 +0200)
committer
David Kalnischkies
<kalnischkies@gmail.com>
Sat, 3 Apr 2010 15:57:41 +0000
(17:57 +0200)
in the event of a failure in OpenLog() (which will happen if called with
Debug::NoLocking as user)
apt-pkg/deb/dpkgpm.cc
patch
|
blob
|
blame
|
history
diff --git
a/apt-pkg/deb/dpkgpm.cc
b/apt-pkg/deb/dpkgpm.cc
index c0efa7b5948bb9c0a1ef34986692789931ed815b..14a4968f7a49a71504eecc6152e0753017a52529 100644
(file)
--- a/
apt-pkg/deb/dpkgpm.cc
+++ b/
apt-pkg/deb/dpkgpm.cc
@@
-105,7
+105,7
@@
ionice(int PID)
/* */
pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache)
: pkgPackageManager(Cache), dpkgbuf_pos(0),
- term_out(NULL), PackagesDone(0), PackagesTotal(0)
+ term_out(NULL),
history_out(NULL),
PackagesDone(0), PackagesTotal(0)
{
}
/*}}}*/
@@
-651,6
+651,7
@@
bool pkgDPkgPM::CloseLog()
fprintf(history_out, "End-Date: %s\n", timestr);
fclose(history_out);
}
+ history_out = NULL;
return true;
}