Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
polkit
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Debian Utopia Team
polkit
Commits
70bd6cb9
Unverified
Commit
70bd6cb9
authored
6 months ago
by
Jan Rybar
Committed by
GitHub
6 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Static analysis findng - 'buf' can go out of scope (#464)
parent
b364bf12
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/polkitbackend/polkitbackendcommon.c
+3
-2
3 additions, 2 deletions
src/polkitbackend/polkitbackendcommon.c
with
3 additions
and
2 deletions
src/polkitbackend/polkitbackendcommon.c
+
3
−
2
View file @
70bd6cb9
...
@@ -172,13 +172,14 @@ utils_child_watch_cb (GPid pid,
...
@@ -172,13 +172,14 @@ utils_child_watch_cb (GPid pid,
if
(
g_io_channel_read_to_end
(
data
->
child_stdout_channel
,
&
buf
,
&
buf_size
,
NULL
)
==
G_IO_STATUS_NORMAL
)
if
(
g_io_channel_read_to_end
(
data
->
child_stdout_channel
,
&
buf
,
&
buf_size
,
NULL
)
==
G_IO_STATUS_NORMAL
)
{
{
g_string_append_len
(
data
->
child_stdout
,
buf
,
buf_size
);
g_string_append_len
(
data
->
child_stdout
,
buf
,
buf_size
);
g_free
(
buf
);
}
}
g_free
(
buf
);
if
(
g_io_channel_read_to_end
(
data
->
child_stderr_channel
,
&
buf
,
&
buf_size
,
NULL
)
==
G_IO_STATUS_NORMAL
)
if
(
g_io_channel_read_to_end
(
data
->
child_stderr_channel
,
&
buf
,
&
buf_size
,
NULL
)
==
G_IO_STATUS_NORMAL
)
{
{
g_string_append_len
(
data
->
child_stderr
,
buf
,
buf_size
);
g_string_append_len
(
data
->
child_stderr
,
buf
,
buf_size
);
g_free
(
buf
);
}
}
g_free
(
buf
);
data
->
exit_status
=
status
;
data
->
exit_status
=
status
;
...
...
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