src: fix task release in cares_wrap.cc

PR-URL: https://github.com/nodejs/node/pull/26815
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
gengjiawen authored and Daniel Bevenius committed 2019-03-28 07:37:34 +01:00
1 parent 3440cf6a27
commit 78ae094ed0
1 file changed
+1 -1
+1 -1
View File
@@ -307,7 +307,7 @@ node_ares_task* ares_task_create(ChannelWrap* channel, ares_socket_t sock) {
if (uv_poll_init_socket(channel->env()->event_loop(),
&task->poll_watcher, sock) < 0) {
/* This should never happen. */
free(task);
delete task;
return nullptr;
}