From d39dbceb2a9bc5365f0cd66dded26251388314a5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 27 Feb 2020 13:28:06 +0100 Subject: [PATCH] port: copy error string in update_state update_state will free the error string later so we need to make a copy of static strings. --- src/pipewire/impl-port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipewire/impl-port.c b/src/pipewire/impl-port.c index 59a5fdf3e..dbafc5cf5 100644 --- a/src/pipewire/impl-port.c +++ b/src/pipewire/impl-port.c @@ -1267,7 +1267,7 @@ int pw_impl_port_use_buffers(struct pw_impl_port *port, struct pw_impl_port_mix pw_log_error(NAME" %p: negotiate buffers on node: %d (%s)", port, res, spa_strerror(res)); pw_impl_port_update_state(port, PW_IMPL_PORT_STATE_ERROR, - "can't negotiate buffers on port"); + strdup("can't negotiate buffers on port")); } else if (n_buffers > 0 && !SPA_RESULT_IS_ASYNC(res)) { pw_impl_port_update_state(port, PW_IMPL_PORT_STATE_PAUSED, NULL); }