# HG changeset patch # User Richard Nelson # Date 1175135754 0 # Node ID 8a54f74fecdf40fab1f146f9974dff91232c0cfa # Parent 26a5869b31658fc54228bbd4848da9a35542e88f plug some leaks diff -r 26a5869b3165 -r 8a54f74fecdf finch/gntft.c --- a/finch/gntft.c Thu Mar 29 01:27:40 2007 +0000 +++ b/finch/gntft.c Thu Mar 29 02:35:54 2007 +0000 @@ -392,8 +392,6 @@ elapsed = (xfer->start_time > 0 ? now - xfer->start_time : 0); kbps = (elapsed > 0 ? (kb_sent / elapsed) : 0); - kbsec = g_strdup_printf(_("%.2f KB/s"), kbps); - g_return_if_fail(xfer_dialog != NULL); g_return_if_fail(xfer != NULL); @@ -413,6 +411,7 @@ size_str = purple_str_size_to_units(purple_xfer_get_size(xfer)); remaining_str = purple_str_size_to_units(purple_xfer_get_bytes_remaining(xfer)); + kbsec = g_strdup_printf(_("%.2f KB/s"), kbps); gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_PROGRESS, g_ascii_dtostr(prog_str, sizeof(prog_str), purple_xfer_get_progress(xfer) * 100.)); @@ -421,6 +420,7 @@ gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_SPEED, kbsec); g_free(size_str); g_free(remaining_str); + g_free(kbsec); if (purple_xfer_is_completed(xfer)) { gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_STATUS, _("Finished")); gnt_tree_change_text(GNT_TREE(xfer_dialog->tree), xfer, COLUMN_REMAINING, _("Finished")); diff -r 26a5869b3165 -r 8a54f74fecdf finch/libgnt/gntfilesel.c --- a/finch/libgnt/gntfilesel.c Thu Mar 29 01:27:40 2007 +0000 +++ b/finch/libgnt/gntfilesel.c Thu Mar 29 02:35:54 2007 +0000 @@ -464,7 +464,7 @@ { char *ret; if (sel->dirsonly) { - ret = g_strdup(g_path_get_dirname(gnt_entry_get_text(GNT_ENTRY(sel->location)))); + ret = g_path_get_dirname(gnt_entry_get_text(GNT_ENTRY(sel->location))); } else { ret = g_strdup(gnt_entry_get_text(GNT_ENTRY(sel->location))); } diff -r 26a5869b3165 -r 8a54f74fecdf finch/libgnt/gntstyle.c --- a/finch/libgnt/gntstyle.c Thu Mar 29 01:27:40 2007 +0000 +++ b/finch/libgnt/gntstyle.c Thu Mar 29 02:35:54 2007 +0000 @@ -218,9 +218,8 @@ { for (i = 0; styles[i].style; i++) { - error = NULL; str_styles[styles[i].en] = - g_key_file_get_string(kfile, "general", styles[i].style, &error); + g_key_file_get_string(kfile, "general", styles[i].style, NULL); } } g_strfreev(keys); diff -r 26a5869b3165 -r 8a54f74fecdf finch/libgnt/gntwm.c --- a/finch/libgnt/gntwm.c Thu Mar 29 01:27:40 2007 +0000 +++ b/finch/libgnt/gntwm.c Thu Mar 29 02:35:54 2007 +0000 @@ -246,6 +246,7 @@ } g_free(filename); + g_key_file_free(gfile); #endif }