Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
9cc91816
Commit
9cc91816
authored
5 years ago
by
Ludovico de Nittis
Browse files
Options
Downloads
Patches
Plain Diff
locale: fix leaked SrtLocale
Signed-off-by:
Ludovico de Nittis
<
ludovico.denittis@collabora.com
>
parent
7580f37b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!55
locale: fix leaked SrtLocale
Pipeline
#1638
passed
5 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
steam-runtime-tools/system-info.c
+7
-2
7 additions, 2 deletions
steam-runtime-tools/system-info.c
tests/locale.c
+2
-0
2 additions, 0 deletions
tests/locale.c
with
9 additions
and
2 deletions
steam-runtime-tools/system-info.c
+
7
−
2
View file @
9cc91816
...
...
@@ -1378,9 +1378,14 @@ srt_system_info_check_locale (SrtSystemInfo *self,
&
local_error
);
if
(
locale
!=
NULL
)
maybe
=
maybe_locale_new_positive
(
locale
);
{
maybe
=
maybe_locale_new_positive
(
locale
);
g_object_unref
(
locale
);
}
else
maybe
=
maybe_locale_new_negative
(
local_error
);
{
maybe
=
maybe_locale_new_negative
(
local_error
);
}
g_hash_table_replace
(
self
->
locales
.
cached_locales
,
GUINT_TO_POINTER
(
quark
),
...
...
This diff is collapsed.
Click to expand it.
tests/locale.c
+
2
−
0
View file @
9cc91816
...
...
@@ -115,6 +115,7 @@ test_object (Fixture *f,
g_free
(
req
);
g_free
(
res
);
g_free
(
charset
);
g_object_unref
(
locale
);
locale
=
_srt_locale_new
(
"en_US"
,
"en_US"
,
...
...
@@ -124,6 +125,7 @@ test_object (Fixture *f,
g_assert_cmpstr
(
srt_locale_get_resulting_name
(
locale
),
==
,
"en_US"
);
g_assert_cmpstr
(
srt_locale_get_charset
(
locale
),
==
,
"ISO-8859-1"
);
g_assert_cmpint
(
srt_locale_is_utf8
(
locale
),
==
,
FALSE
);
g_object_unref
(
locale
);
}
static
void
...
...
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