diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2017-11-14 10:18:32 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2017-11-15 12:09:24 +0100 |
commit | 8203ce8316358c91bce455bb0d309cb3b5289d15 (patch) | |
tree | ea5b3b5a64e7c370f7997c06097ca8345dcdcd0e /src/cares_wrap.cc | |
parent | 0fdd88a374e23e1dd4a05d93afd5eb0c3b080fd5 (diff) | |
download | node-new-8203ce8316358c91bce455bb0d309cb3b5289d15.tar.gz |
src: fix bad sizeof expression
It was computing the size of the pointer, not the size of the pointed-to
object.
Introduced in commit 727b2911eca ("src,dns: refactor cares_wrap to avoid
global state".)
PR-URL: https://github.com/nodejs/node/pull/17014
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/cares_wrap.cc')
-rw-r--r-- | src/cares_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 1382d60ee3..27575fd812 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -160,7 +160,7 @@ class ChannelWrap : public AsyncWrap { } inline node_ares_task_list* task_list() { return &task_list_; } - size_t self_size() const override { return sizeof(this); } + size_t self_size() const override { return sizeof(*this); } static void AresTimeout(uv_timer_t* handle); |