Mercurial > pidgin
diff libpurple/protocols/irc/msgs.c @ 24203:e6b79961f69b
Unleak
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 29 Sep 2008 01:36:09 +0000 |
parents | 819346c150f1 |
children | 4f46eb13b540 5ace6c024230 985ab911753e |
line wrap: on
line diff
--- a/libpurple/protocols/irc/msgs.c Mon Sep 29 01:27:57 2008 +0000 +++ b/libpurple/protocols/irc/msgs.c Mon Sep 29 01:36:09 2008 +0000 @@ -215,8 +215,10 @@ /* This is an extended syntax, not in RFC 1459 */ int t1 = atoi(args[4]); time_t t2 = time(NULL); + char *time = purple_str_seconds_to_string(t2 - t1); msg = g_strdup_printf(_("Ban on %s by %s, set %s ago"), - args[2], args[3], purple_str_seconds_to_string(t2 - t1)); + args[2], args[3], time); + g_free(time); } else { msg = g_strdup_printf(_("Ban on %s"), args[2]); }