Cleanup char* to auto_gchar gchar* for prefs_get_string

Necessity explained in #1819
This commit is contained in:
John Hernandez
2023-06-13 22:01:08 +02:00
parent 1c102fec27
commit 4a70f5f513
19 changed files with 133 additions and 275 deletions

View File

@@ -1469,7 +1469,7 @@ omemo_automatic_start(const char* const recipient)
}
} else {
// check global setting
char* pref_omemo_policy = prefs_get_string(PREF_OMEMO_POLICY);
auto_gchar gchar* pref_omemo_policy = prefs_get_string(PREF_OMEMO_POLICY);
// pref defaults to manual
policy = PROF_OMEMOPOLICY_AUTOMATIC;
@@ -1479,8 +1479,6 @@ omemo_automatic_start(const char* const recipient)
} else if (strcmp(pref_omemo_policy, "always") == 0) {
policy = PROF_OMEMOPOLICY_ALWAYS;
}
g_free(pref_omemo_policy);
}
switch (policy) {