diff options
-rw-r--r-- | src/plugins/c_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/c_api.c b/src/plugins/c_api.c index 042010db..26cb0c00 100644 --- a/src/plugins/c_api.c +++ b/src/plugins/c_api.c @@ -365,9 +365,9 @@ static char * _c_plugin_name(const char *filename) { GString *plugin_name_str = g_string_new(""); - char *name = strndup(filename, strlen(filename)-1); + gchar *name = g_strndup(filename, strlen(filename)-1); g_string_append(plugin_name_str, name); - free(name); + g_free(name); g_string_append(plugin_name_str, "so"); char *result = plugin_name_str->str; g_string_free(plugin_name_str, FALSE); |