diff options
author | James Booth <boothj5@gmail.com> | 2014-06-17 23:34:52 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-06-17 23:34:52 +0100 |
commit | 79ddf1048486d1a77a1aee9b8152c8ffb25d8a11 (patch) | |
tree | ae96e2efee1116f006b2c77137e87efabd73f0c3 /src/otr | |
parent | ad68bcfde2d606906242f265a661ea3690e145bd (diff) | |
download | profani-tty-79ddf1048486d1a77a1aee9b8152c8ffb25d8a11.tar.gz |
Fixed memleaks with otr policy and autoaway options
Diffstat (limited to 'src/otr')
-rw-r--r-- | src/otr/otr.c | 8 |
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); |