diff options
author | James Booth <boothj5@gmail.com> | 2016-07-27 21:32:44 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-07-27 21:32:44 +0100 |
commit | 6c1fef522a6bd74033ddf8497e9cd305026b0a56 (patch) | |
tree | b3c31536b5211d74214857678fc253921ec5bddd /src | |
parent | ae003e62fbc3cdec698e6c13f7f1e9bf06cbc91f (diff) | |
download | profani-tty-6c1fef522a6bd74033ddf8497e9cd305026b0a56.tar.gz |
Use g_strndup in c_api.c
Diffstat (limited to 'src')
-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); |