Parent: 8b69a634f4cbd51ec266ee5bb3a9fe77c05e4be4
Author: Tedd Ho-Jeong An <tedd.an@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2022-02-12 00:17:27
Tree: 9013ac179b43941bcd2a6038079b5c93e51afacb
profiles: Fix the reusing gerror without re-initialization When the GError variable is freeed with g_error_free(), it is not set to NULL and reusing the same variable again can cause the seg_fault because it is still pointing the old memory address which is freed. This patch relaces the g_error_free() to g_clear_error() which frees the variable and set it to NULL if the variable is used in the function again. Fixes: 4ad622d592ba5 ("profiles/a2dp: Fix unchecked return value")
Diffstat
| M | profiles/audio/a2dp.c | | | 4 | ++- - |
| M | profiles/health/hdp.c | | | 6 | +++- - - |
| M | profiles/input/device.c | | | 2 | +- |
3 files changed, 6 insertions(+), 6 deletions(-)