about summary refs log tree commit diff stats
path: root/src/plugins
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2023-05-11 08:46:28 +0200
committerGitHub <noreply@github.com>2023-05-11 08:46:28 +0200
commitf3265565e853ecf993f12093c6a0c94acf3f212e (patch)
tree15c2735f04b414a1a8426499302f90fb9408a6f3 /src/plugins
parent209a8f4bf5b2db2ca54f727d29e625228bccd170 (diff)
parentea35a4ceb03a975b4c1dabc5eb71510162dbe25f (diff)
downloadprofani-tty-f3265565e853ecf993f12093c6a0c94acf3f212e.tar.gz
Merge pull request #1839 from H3rnand3zzz/cleanup/gchar-char
Cleanup: gchar as gchar instead of char
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/python_plugins.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c
index c32d177c..cf1e4a87 100644
--- a/src/plugins/python_plugins.c
+++ b/src/plugins/python_plugins.c
@@ -874,9 +874,8 @@ static void
 _python_undefined_error(ProfPlugin* plugin, char* hook, char* type)
 {
     GString* err_msg = g_string_new("Plugin error - ");
-    char* module_name = g_strndup(plugin->name, strlen(plugin->name) - 2);
+    auto_gchar gchar* module_name = g_strndup(plugin->name, strlen(plugin->name) - 2);
     g_string_append(err_msg, module_name);
-    free(module_name);
     g_string_append(err_msg, hook);
     g_string_append(err_msg, "(): return value undefined, expected ");
     g_string_append(err_msg, type);
@@ -889,9 +888,8 @@ static void
 _python_type_error(ProfPlugin* plugin, char* hook, char* type)
 {
     GString* err_msg = g_string_new("Plugin error - ");
-    char* module_name = g_strndup(plugin->name, strlen(plugin->name) - 2);
+    auto_gchar gchar* module_name = g_strndup(plugin->name, strlen(plugin->name) - 2);
     g_string_append(err_msg, module_name);
-    free(module_name);
     g_string_append(err_msg, hook);
     g_string_append(err_msg, "(): incorrect return type, expected ");
     g_string_append(err_msg, type);