diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2023-03-23 22:03:45 -0500 |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2023-03-23 22:03:45 -0500 |
commit | ddbb62d46470ba81a3cd2ec91febe6d11e3f34e0 (patch) | |
tree | e2169f7c89e68fc2e403803f9ce7d3d619a56620 /libpurple/prefs.c | |
parent | 16071bc64088b65c889ddbc993f8f52cecace8ed (diff) | |
download | pidgin-ddbb62d46470ba81a3cd2ec91febe6d11e3f34e0.tar.gz |
Fix leaked errors
And also simplify some cases with `g_clear_error`.
Testing Done:
Compiled and ran tests in valgrind, though it never noticed these anyway.
Reviewed at https://reviews.imfreedom.org/r/2384/
Diffstat (limited to 'libpurple/prefs.c')
-rw-r--r-- | libpurple/prefs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libpurple/prefs.c b/libpurple/prefs.c index 268cefc9b3..9c0816d139 100644 --- a/libpurple/prefs.c +++ b/libpurple/prefs.c @@ -410,9 +410,7 @@ purple_prefs_load(void) if(!g_file_get_contents(filename, &contents, &length, &error)) { const gchar *sysconfdir = PURPLE_SYSCONFDIR; g_free(filename); - g_error_free(error); - - error = NULL; + g_clear_error(&error); if (sysconfdir == NULL) sysconfdir = ""; |