about summary refs log tree commit diff stats
path: root/src/otr
diff options
context:
space:
mode:
Diffstat (limited to 'src/otr')
-rw-r--r--src/otr/otr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/otr/otr.c b/src/otr/otr.c
index 501c7583..7a5733bf 100644
--- a/src/otr/otr.c
+++ b/src/otr/otr.c
@@ -527,15 +527,15 @@ _otr_get_policy(const char * const recipient)
     // check contact specific setting
     if (g_list_find_custom(account->otr_manual, recipient, (GCompareFunc)g_strcmp0)) {
         account_free(account);
-        return "manual";
+        return strdup("manual");
     }
     if (g_list_find_custom(account->otr_opportunistic, recipient, (GCompareFunc)g_strcmp0)) {
         account_free(account);
-        return "opportunistic";
+        return strdup("opportunistic");
     }
     if (g_list_find_custom(account->otr_always, recipient, (GCompareFunc)g_strcmp0)) {
         account_free(account);
-        return "always";
+        return strdup("always");
     }
 
     // check default account setting
@@ -551,7 +551,7 @@ _otr_get_policy(const char * const recipient)
             result = "always";
         }
         account_free(account);
-        return result;
+        return strdup(result);
     }
     account_free(account);