about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/console.c10
-rw-r--r--src/ui/core.c12
-rw-r--r--src/xmpp/roster.c2
3 files changed, 12 insertions, 12 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 6efc1cf1..42c4e080 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -687,15 +687,15 @@ cons_show_disco_info(const char *jid, GSList *identities, GSList *features)
             DiscoIdentity *identity = identities->data;  // anme trpe, cat
             GString *identity_str = g_string_new("    ");
             if (identity->name != NULL) {
-                identity_str = g_string_append(identity_str, strdup(identity->name));
+                identity_str = g_string_append(identity_str, identity->name);
                 identity_str = g_string_append(identity_str, " ");
             }
             if (identity->type != NULL) {
-                identity_str = g_string_append(identity_str, strdup(identity->type));
+                identity_str = g_string_append(identity_str, identity->type);
                 identity_str = g_string_append(identity_str, " ");
             }
             if (identity->category != NULL) {
-                identity_str = g_string_append(identity_str, strdup(identity->category));
+                identity_str = g_string_append(identity_str, identity->category);
             }
             cons_show(identity_str->str);
             g_string_free(identity_str, FALSE);
@@ -1347,7 +1347,7 @@ _show_roster_contacts(GSList *list, gboolean show_groups)
         title = g_string_append(title, p_contact_barejid(contact));
         if (p_contact_name(contact) != NULL) {
             title = g_string_append(title, " (");
-            title = g_string_append(title, strdup(p_contact_name(contact)));
+            title = g_string_append(title, p_contact_name(contact));
             title = g_string_append(title, ")");
         }
 
@@ -1394,7 +1394,7 @@ _show_roster_contacts(GSList *list, gboolean show_groups)
             if (groups != NULL) {
                 GString *groups_str = g_string_new("    Groups : ");
                 while (groups != NULL) {
-                    g_string_append(groups_str, strdup(groups->data));
+                    g_string_append(groups_str, groups->data);
                     if (g_slist_next(groups) != NULL) {
                         g_string_append(groups_str, ", ");
                     }
diff --git a/src/ui/core.c b/src/ui/core.c
index b33186ec..e73c0a67 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -492,15 +492,15 @@ ui_contact_online(const char * const barejid, const char * const resource,
 
     // use nickname if exists
     if (p_contact_name(contact) != NULL) {
-        g_string_append(display_str, strdup(p_contact_name(contact)));
+        g_string_append(display_str, p_contact_name(contact));
     } else {
-        g_string_append(display_str, strdup(barejid));
+        g_string_append(display_str, barejid);
     }
 
     // add resource if not default provided by profanity
     if (strcmp(jid->resourcepart, "__prof_default") != 0) {
         g_string_append(display_str, " (");
-        g_string_append(display_str, strdup(jid->resourcepart));
+        g_string_append(display_str, jid->resourcepart);
         g_string_append(display_str, ")");
     }
 
@@ -531,15 +531,15 @@ ui_contact_offline(const char * const from, const char * const show,
 
     // use nickname if exists
     if (p_contact_name(contact) != NULL) {
-        g_string_append(display_str, strdup(p_contact_name(contact)));
+        g_string_append(display_str, p_contact_name(contact));
     } else {
-        g_string_append(display_str, strdup(jidp->barejid));
+        g_string_append(display_str, jidp->barejid);
     }
 
     // add resource if not default provided by profanity
     if (strcmp(jidp->resourcepart, "__prof_default") != 0) {
         g_string_append(display_str, " (");
-        g_string_append(display_str, strdup(jidp->resourcepart));
+        g_string_append(display_str, jidp->resourcepart);
         g_string_append(display_str, ")");
     }
 
diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c
index ed72d502..b31a2725 100644
--- a/src/xmpp/roster.c
+++ b/src/xmpp/roster.c
@@ -567,7 +567,7 @@ _roster_handle_push(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
             while (resources != NULL) {
                 GString *fulljid = g_string_new(strdup(barejid));
                 g_string_append(fulljid, "/");
-                g_string_append(fulljid, strdup(resources->data));
+                g_string_append(fulljid, resources->data);
                 autocomplete_remove(fulljid_ac, fulljid->str);
                 g_string_free(fulljid, TRUE);
                 resources = g_list_next(resources);