Skip to content

Commit f6ec5fa

Browse files
bnoordhuisMylesBorins
authored andcommitted
src: fix bad sizeof expression
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]>
1 parent f80cf5a commit f6ec5fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cares_wrap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class ChannelWrap : public AsyncWrap {
160160
}
161161
inline node_ares_task_list* task_list() { return &task_list_; }
162162

163-
size_t self_size() const override { return sizeof(this); }
163+
size_t self_size() const override { return sizeof(*this); }
164164

165165
static void AresTimeout(uv_timer_t* handle);
166166

0 commit comments

Comments
 (0)