Skip to content

Commit af57990

Browse files
bnoordhuisgibfahn
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 ab46b8e commit af57990

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/cares_wrap.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class ChannelWrap : public AsyncWrap{
158158
}
159159
inline node_ares_task_list* task_list(){return &task_list_}
160160

161-
size_tself_size() constoverride{returnsizeof(this)}
161+
size_tself_size() constoverride{returnsizeof(*this)}
162162

163163
staticvoidAresTimeout(uv_timer_t* handle);
164164

0 commit comments

Comments
(0)