Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai
sso
Commits
50ea9c86
Commit
50ea9c86
authored
2 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Fix memory leak on successful deserialization
parent
782b3662
No related branches found
No related tags found
1 merge request
!5
Refactor ticket deserialization code
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sso/sso.c
+3
-4
3 additions, 4 deletions
src/sso/sso.c
with
3 additions
and
4 deletions
src/sso/sso.c
+
3
−
4
View file @
50ea9c86
...
...
@@ -218,7 +218,8 @@ static int sso_ticket_deserialize(sso_ticket_t *t, const char *s, int sz) {
*
session_id
=
NULL
;
char
**
groups
=
NULL
;
time_t
expires
=
0
;
int
err
,
field_size
;
int
err
=
SSO_OK
;
int
field_size
;
int
i
=
0
,
last
=
0
,
field
=
0
;
char
*
token
;
...
...
@@ -261,7 +262,7 @@ static int sso_ticket_deserialize(sso_ticket_t *t, const char *s, int sz) {
free
(
token
);
break
;
case
7
:
groups
=
(
char
**
)
group_list_parse
(
token
);
groups
=
group_list_parse
(
token
);
free
(
token
);
break
;
default:
...
...
@@ -285,8 +286,6 @@ static int sso_ticket_deserialize(sso_ticket_t *t, const char *s, int sz) {
}
*
t
=
sso_ticket_new
(
user
,
service
,
domain
,
nonce
,
session_id
,
(
const
char
**
)
groups
,
expires
);
free
(
version
);
return
SSO_OK
;
fail:
if
(
version
!=
NULL
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment