Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 430010 Details for
Bug 555916
net-news/newsbeuter-2.9 segfaults under certain conditions
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix segfault in podbeuter
Fix-segfault.patch (text/plain), 1.47 KB, created by
Nicolas Porcel
on 2016-04-09 16:11:36 UTC
(
hide
)
Description:
Fix segfault in podbeuter
Filename:
MIME Type:
Creator:
Nicolas Porcel
Created:
2016-04-09 16:11:36 UTC
Size:
1.47 KB
patch
obsolete
>diff --git a/include/poddlthread.h b/include/poddlthread.h >index a10b9e7..cf0f1da 100644 >--- a/include/poddlthread.h >+++ b/include/poddlthread.h >@@ -7,6 +7,7 @@ > > #include <sys/time.h> > #include <time.h> >+#include <memory> > > #include <configcontainer.h> > >@@ -24,7 +25,7 @@ class poddlthread { > private: > void mkdir_p(const char * file); > download * dl; >- std::ofstream *f; >+ std::shared_ptr<std::ofstream> f; > timeval tv1; > timeval tv2; > size_t bytecount; >diff --git a/src/pb_controller.cpp b/src/pb_controller.cpp >index 09b5e89..da8ffcb 100644 >--- a/src/pb_controller.cpp >+++ b/src/pb_controller.cpp >@@ -287,6 +287,7 @@ void pb_controller::start_downloads() { > if (it->status() == DL_QUEUED) { > std::thread t {poddlthread(&(*it), cfg)}; > --dl2start; >+ t.detach(); > } > } > } >diff --git a/src/pb_view.cpp b/src/pb_view.cpp >index fb61c72..f3cb478 100644 >--- a/src/pb_view.cpp >+++ b/src/pb_view.cpp >@@ -111,6 +111,7 @@ void pb_view::run(bool auto_download) { > if (idx != -1) { > if (ctrl->downloads()[idx].status() != DL_DOWNLOADING) { > std::thread t {poddlthread(&ctrl->downloads()[idx], ctrl->get_cfgcont())}; >+ t.detach(); > } > } > } >diff --git a/src/poddlthread.cpp b/src/poddlthread.cpp >index 583481e..3a1b390 100644 >--- a/src/poddlthread.cpp >+++ b/src/poddlthread.cpp >@@ -22,7 +22,6 @@ poddlthread::poddlthread(download * dl_, newsbeuter::configcontainer * c) : dl(d > } > > poddlthread::~poddlthread() { >- delete f; > } > > void poddlthread::operator()() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 555916
: 430010