Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julian Bouzas
WirePlumber
Commits
3e6edcb0
Commit
3e6edcb0
authored
May 24, 2021
by
Julian Bouzas
Browse files
pipewire-object-mixin: fix memleak in GList
parent
7741c2e4
Pipeline
#325039
passed with stages
in 1 minute and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/wp/private/pipewire-object-mixin.c
View file @
3e6edcb0
...
@@ -123,7 +123,7 @@ enum_params_done (WpCore * core, GAsyncResult * res, gpointer data)
...
@@ -123,7 +123,7 @@ enum_params_done (WpCore * core, GAsyncResult * res, gpointer data)
return
;
return
;
/* remove the task from the stored list; ref is held by the g_autoptr */
/* remove the task from the stored list; ref is held by the g_autoptr */
d
->
enum_params_tasks
=
g_list_
remov
e_link
(
d
->
enum_params_tasks
,
taskl
);
d
->
enum_params_tasks
=
g_list_
delet
e_link
(
d
->
enum_params_tasks
,
taskl
);
wp_debug_object
(
instance
,
"got %u params, %s, task "
WP_OBJECT_FORMAT
,
wp_debug_object
(
instance
,
"got %u params, %s, task "
WP_OBJECT_FORMAT
,
params
->
len
,
error
?
"with error"
:
"ok"
,
WP_OBJECT_ARGS
(
task
));
params
->
len
,
error
?
"with error"
:
"ok"
,
WP_OBJECT_ARGS
(
task
));
...
@@ -149,7 +149,7 @@ enum_params_error (WpProxy * proxy, int seq, int res, const gchar *msg,
...
@@ -149,7 +149,7 @@ enum_params_error (WpProxy * proxy, int seq, int res, const gchar *msg,
taskl
=
g_list_find
(
d
->
enum_params_tasks
,
task
);
taskl
=
g_list_find
(
d
->
enum_params_tasks
,
task
);
if
(
taskl
)
{
if
(
taskl
)
{
d
->
enum_params_tasks
=
g_list_
remov
e_link
(
d
->
enum_params_tasks
,
taskl
);
d
->
enum_params_tasks
=
g_list_
delet
e_link
(
d
->
enum_params_tasks
,
taskl
);
g_task_return_new_error
(
task
,
WP_DOMAIN_LIBRARY
,
g_task_return_new_error
(
task
,
WP_DOMAIN_LIBRARY
,
WP_LIBRARY_ERROR_OPERATION_FAILED
,
"%s"
,
msg
);
WP_LIBRARY_ERROR_OPERATION_FAILED
,
"%s"
,
msg
);
}
}
...
@@ -432,7 +432,7 @@ wp_pw_object_mixin_store_param (WpPwObjectMixinData * data, guint32 id,
...
@@ -432,7 +432,7 @@ wp_pw_object_mixin_store_param (WpPwObjectMixinData * data, guint32 id,
}
}
else
if
(
s
&&
(
flags
&
WP_PW_OBJECT_MIXIN_STORE_PARAM_REMOVE
))
{
else
if
(
s
&&
(
flags
&
WP_PW_OBJECT_MIXIN_STORE_PARAM_REMOVE
))
{
wp_pw_object_mixin_param_store_free
(
s
);
wp_pw_object_mixin_param_store_free
(
s
);
data
->
params
=
g_list_
remov
e_link
(
data
->
params
,
link
);
data
->
params
=
g_list_
delet
e_link
(
data
->
params
,
link
);
return
;
return
;
}
}
...
@@ -691,8 +691,9 @@ wp_pw_object_mixin_handle_pw_proxy_destroyed (WpProxy * proxy)
...
@@ -691,8 +691,9 @@ wp_pw_object_mixin_handle_pw_proxy_destroyed (WpProxy * proxy)
GList
*
link
;
GList
*
link
;
for
(
link
=
g_list_first
(
d
->
enum_params_tasks
);
for
(
link
=
g_list_first
(
d
->
enum_params_tasks
);
link
;
link
=
g_list_first
(
d
->
enum_params_tasks
))
{
link
;
link
=
g_list_first
(
d
->
enum_params_tasks
))
{
d
->
enum_params_tasks
=
g_list_remove_link
(
d
->
enum_params_tasks
,
link
);
GTask
*
task
=
G_TASK
(
link
->
data
);
g_task_return_new_error
(
G_TASK
(
link
->
data
),
d
->
enum_params_tasks
=
g_list_delete_link
(
d
->
enum_params_tasks
,
link
);
g_task_return_new_error
(
task
,
WP_DOMAIN_LIBRARY
,
WP_LIBRARY_ERROR_OPERATION_FAILED
,
WP_DOMAIN_LIBRARY
,
WP_LIBRARY_ERROR_OPERATION_FAILED
,
"pipewire proxy destroyed before finishing"
);
"pipewire proxy destroyed before finishing"
);
}
}
...
...
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