Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix memleak in TorController [rework] #7637

Merged
merged 1 commit into from Mar 11, 2016

Conversation

Projects
None yet
5 participants
Owner

laanwj commented Mar 3, 2016

It looks like, TorController::disconnected_cb(TorControlConnection& conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and deleting it only once in the destructor (thanks to Cory Fields for the idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.

Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.
Member

jonasschnelli commented Mar 3, 2016

utACK.

Member

theuni commented Mar 4, 2016

ut ACK

@laanwj laanwj merged commit e219503 into bitcoin:master Mar 11, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Mar 11, 2016

Merge #7637: Fix memleak in TorController [rework]
e219503 Fix memleak in TorController [rework] (Wladimir J. van der Laan)

This removal generated new warning:

torcontrol.cpp:365:24: warning: private field 'base' is not used [-Wunused-private-field]
    struct event_base* base;
                       ^
1 warning generated.

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Apr 27, 2016

Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.

Github-Pull: #7637
Rebased-From: e219503
Member

MarcoFalke commented Jun 9, 2016

Backported as part of #7938. Removing label 'Needs backport'.

zander added a commit to zander/bitcoinclassic that referenced this pull request Jun 16, 2016

Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.

Github-Pull: #7637
Rebased-From: e219503

thokon00 added a commit to faircoin/faircoin that referenced this pull request Jun 28, 2016

Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.

Github-Pull: #7637
Rebased-From: e219503

sickpig added a commit to sickpig/BitcoinUnlimited that referenced this pull request Nov 14, 2016

Fix memleak in TorController [rework]
It looks like, TorController::disconnected_cb(TorControlConnection&
conn) gets called multiple times which results in multiple event_new().

Avoid this by creating the event only once in the constructore, and
deleting it only once in the destructor (thanks to Cory Fields for the
idea).

Replaces the fix by Jonas Schnelli in #7610, see discussion there.

Github-Pull: #7637
Rebased-From: e219503

@str4d str4d referenced this pull request in zcash/zcash Mar 24, 2017

Merged

Tor ephemeral hidden services #2177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment