Parent: b4e74f7bd0ca1f8c251077367a9b040c4a651617
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: d6274fd1e29d09e13dc710884a3b2624c076b4e7
device: 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: 6a154cd08000b ("device: Fix unchecked return value")
Diffstat
| M | src/device.c | | | 12 | ++++++- - - - - - |
1 files changed, 6 insertions(+), 6 deletions(-)