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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
bnoordhuis authored and MylesBorins committed Dec 11, 2017
1 parent f80cf5a commit f6ec5fa
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 @@ -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);

Expand Down

0 comments on commit f6ec5fa

Please sign in to comment.