Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
025e9a01
Commit
025e9a01
authored
Jun 05, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Jun 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kerberos: Fix memory leaks in (wow64_)query_ticket_cache (scan-build).
parent
9e3f1a15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
unixlib.c
dlls/kerberos/unixlib.c
+15
-12
No files found.
dlls/kerberos/unixlib.c
View file @
025e9a01
...
...
@@ -339,22 +339,30 @@ done:
return
status
;
}
static
void
free_tickets_in_list
(
struct
ticket_list
*
list
)
{
ULONG
i
;
for
(
i
=
0
;
i
<
list
->
count
;
i
++
)
{
free
(
list
->
tickets
[
i
].
RealmName
.
Buffer
);
free
(
list
->
tickets
[
i
].
ServerName
.
Buffer
);
}
free
(
list
->
tickets
);
}
static
NTSTATUS
query_ticket_cache
(
void
*
args
)
{
struct
query_ticket_cache_params
*
params
=
args
;
struct
ticket_list
list
=
{
0
};
NTSTATUS
status
;
ULONG
i
;
status
=
kerberos_fill_ticket_list
(
&
list
);
if
(
status
==
STATUS_SUCCESS
)
status
=
copy_tickets_to_client
(
&
list
,
params
->
resp
,
params
->
out_size
);
for
(
i
=
0
;
i
<
list
.
count
;
i
++
)
{
free
(
list
.
tickets
[
i
].
RealmName
.
Buffer
);
free
(
list
.
tickets
[
i
].
ServerName
.
Buffer
);
}
free_tickets_in_list
(
&
list
);
return
status
;
}
...
...
@@ -1237,17 +1245,12 @@ static NTSTATUS wow64_query_ticket_cache( void *args )
}
const
*
params32
=
args
;
struct
ticket_list
list
=
{
0
};
NTSTATUS
status
;
ULONG
i
;
status
=
kerberos_fill_ticket_list
(
&
list
);
if
(
status
==
STATUS_SUCCESS
)
status
=
copy_tickets_to_client32
(
&
list
,
ULongToPtr
(
params32
->
resp
),
ULongToPtr
(
params32
->
out_size
)
);
for
(
i
=
0
;
i
<
list
.
count
;
i
++
)
{
free
(
list
.
tickets
[
i
].
RealmName
.
Buffer
);
free
(
list
.
tickets
[
i
].
ServerName
.
Buffer
);
}
free_tickets_in_list
(
&
list
);
return
status
;
}
...
...
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