Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
ad1eb2fd
Commit
ad1eb2fd
authored
Aug 09, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak I just introduced.
Spotted by: Federico Schwindt
parent
cb94438d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vmod_std_conversions.c
lib/libvmod_std/vmod_std_conversions.c
+3
-1
No files found.
lib/libvmod_std/vmod_std_conversions.c
View file @
ad1eb2fd
...
...
@@ -126,7 +126,7 @@ vmod_integer(const struct vrt_ctx *ctx, const char *p, VCL_INT i)
VCL_IP
vmod_ip
(
const
struct
vrt_ctx
*
ctx
,
VCL_STRING
s
,
VCL_IP
d
)
{
struct
addrinfo
hints
,
*
res0
;
struct
addrinfo
hints
,
*
res0
=
NULL
;
const
struct
addrinfo
*
res
;
int
error
;
char
*
p
;
...
...
@@ -154,5 +154,7 @@ vmod_ip(const struct vrt_ctx *ctx, VCL_STRING s, VCL_IP d)
p
=
WS_Alloc
(
ctx
->
ws
,
VSA_Len
(
d
));
AN
(
p
);
memcpy
(
p
,
d
,
VSA_Len
(
d
));
if
(
res0
!=
NULL
)
freeaddrinfo
(
res0
);
return
(
p
);
}
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