Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jonathan Coetzee
Knot Resolver
Commits
135eb38d
Commit
135eb38d
authored
Nov 13, 2015
by
Marek Vavruša
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daemon: fixed leak on resolve()
parent
d94caa6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
daemon/bindings.c
daemon/bindings.c
+2
-1
No files found.
daemon/bindings.c
View file @
135eb38d
...
...
@@ -642,7 +642,7 @@ static int wrk_resolve(lua_State *L)
knot_pkt_put_question
(
pkt
,
dname
,
rrclass
,
rrtype
);
knot_wire_set_rd
(
pkt
->
wire
);
/* Add OPT RR */
pkt
->
opt_rr
=
knot_rrset_copy
(
worker
->
engine
->
resolver
.
opt_rr
,
&
pkt
->
mm
);
pkt
->
opt_rr
=
knot_rrset_copy
(
worker
->
engine
->
resolver
.
opt_rr
,
NULL
);
if
(
!
pkt
->
opt_rr
)
{
return
kr_error
(
ENOMEM
);
}
...
...
@@ -658,6 +658,7 @@ static int wrk_resolve(lua_State *L)
ret
=
worker_resolve
(
worker
,
pkt
,
options
,
NULL
,
NULL
);
}
knot_rrset_free
(
&
pkt
->
opt_rr
,
NULL
);
knot_pkt_free
(
&
pkt
);
lua_pushboolean
(
L
,
ret
==
0
);
return
1
;
...
...
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