Change char->free to auto_char char for autocleanup
Replace `gchar` and `g_free` to `auto_gchar` Correct certain `char` functions/variables to `gchar` Related to #1819. Edited by @jubalh.
This commit is contained in:
@@ -49,13 +49,11 @@
|
||||
static gchar*
|
||||
_cafile_name(void)
|
||||
{
|
||||
gchar* certs_dir = files_get_data_path(DIR_CERTS);
|
||||
auto_gchar gchar* certs_dir = files_get_data_path(DIR_CERTS);
|
||||
if (!create_dir(certs_dir)) {
|
||||
g_free(certs_dir);
|
||||
return NULL;
|
||||
}
|
||||
gchar* filename = g_strdup_printf("%s/CAfile.pem", certs_dir);
|
||||
g_free(certs_dir);
|
||||
return filename;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user