summary refs log tree commit diff stats
path: root/plugins/fishlim/keystore.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-28 06:08:20 -0500
committerTingPing <tingping@tingping.se>2014-12-28 06:47:07 -0500
commit3f855f07f5d2e9a08a586436719358c40a46f29d (patch)
tree12ffd1b49265e33c10149632a4cd17afb7fe994a /plugins/fishlim/keystore.c
parent83032b1aa3c3e5910c5cfd3e0ea1d25827f56475 (diff)
Use glib for allocations in all plugins
Continuation of 83032b1aa
Diffstat (limited to 'plugins/fishlim/keystore.c')
-rw-r--r--plugins/fishlim/keystore.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/fishlim/keystore.c b/plugins/fishlim/keystore.c
index caad3628..964b4cb4 100644
--- a/plugins/fishlim/keystore.c
+++ b/plugins/fishlim/keystore.c
@@ -29,7 +29,6 @@
 #include <string.h>
 #include "irc.h"
 #include "fish.h"
-#include "misc.h"
 #include "keystore.h"
 #include "plugin_hexchat.h"
 
@@ -97,7 +96,7 @@ char *keystore_get_key(const char *nick) {
     
     if (strncmp(value, "+OK ", 4) != 0) {
         // Key is stored in plaintext
-        return import_glib_string(value);
+        return value;
     } else {
         // Key is encrypted
         const char *encrypted = value+4;
@@ -191,7 +190,7 @@ bool keystore_store_key(const char *nick, const char *key) {
         
         // Store encrypted in file
         g_key_file_set_string(keyfile, nick, "key", wrapped);
-        free(wrapped);
+        g_free(wrapped);
     } else {
         // Store unencrypted in file
         g_key_file_set_string(keyfile, nick, "key", key);
@@ -220,11 +219,3 @@ bool keystore_delete_nick(const char *nick) {
     g_key_file_free(keyfile);
     return ok;
 }
-
-
-void keystore_secure_free(void *ptr, size_t size) {
-    secure_erase(ptr, size);
-    free(ptr);
-}
-
-