Skip to content

Commit

Permalink
src: fix bad sizeof expression
Browse files Browse the repository at this point in the history
It was computing the size of the pointer, not the size of the pointed-to
object.

Introduced in commit 727b291 ("src,dns: refactor cares_wrap to avoid
global state".)

PR-URL: #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>
  • Loading branch information
bnoordhuis authored and gibfahn committed Dec 13, 2017
1 parent ab46b8e commit af57990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cares_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,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);

Expand Down

0 comments on commit af57990

Please sign in to comment.