Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
3cd46689
Commit
3cd46689
authored
Nov 16, 1999
by
Bob Halley
Browse files
In tcp_recv(), free the event before calling destroy(), since the event is
a statically allocated part of the tcpmsg.
parent
70b065bd
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/dns/dispatch.c
View file @
3cd46689
...
...
@@ -585,6 +585,8 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in)
(
void
)
task
;
/* shut up compiler */
REQUIRE
(
VALID_DISPATCH
(
disp
));
XDEBUG
((
"Got TCP packet!
\n
"
));
LOCK
(
&
disp
->
lock
);
...
...
@@ -612,10 +614,16 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in)
UNLOCK
(
&
disp
->
lock
);
/*
* The event is statically allocated in the tcpmsg
* structure, and destroy() frees the tcpmsg, so we must
* free the event *before* calling destroy().
*/
isc_event_free
(
&
ev_in
);
if
(
killit
)
destroy
(
disp
);
isc_event_free
(
&
ev_in
);
return
;
default:
...
...
@@ -983,7 +991,7 @@ dns_dispatch_detach(dns_dispatch_t **dispp)
killit
=
ISC_TRUE
;
}
XDEBUG
((
"dns_dispatch_de
story
: refcount = %d
\n
"
,
disp
->
refcount
));
XDEBUG
((
"dns_dispatch_de
tach
: refcount = %d
\n
"
,
disp
->
refcount
));
UNLOCK
(
&
disp
->
lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment