From 65da34f19eab5edde0615ccc4a58be1947cfce6e Mon Sep 17 00:00:00 2001 From: Arnavion Date: Mon, 8 Dec 2014 21:24:59 -0800 Subject: Removed some unnecessary null-checks for calls to g_free and g_strfreev --- src/common/text.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/common/text.c') diff --git a/src/common/text.c b/src/common/text.c index 329ef37b..6a6b65e7 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -177,7 +177,7 @@ scrollback_shrink (session *sess) g_free (file); if (fh == -1) { - free (buf); + g_free (buf); return; } @@ -200,7 +200,7 @@ scrollback_shrink (session *sess) } close (fh); - free (buf); + g_free (buf); } static void @@ -683,8 +683,7 @@ get_stamp_str (char *fmt, time_t tim, char **ret) *ret = g_locale_to_utf8 (dest, len, 0, &len, 0); } - if (loc) - g_free (loc); + g_free (loc); return len; } @@ -916,8 +915,7 @@ PrintTextTimeStamp (session *sess, char *text, time_t timestamp) scrollback_save (sess, text); fe_print_text (sess, text, timestamp, FALSE); - if (conv) - g_free (conv); + g_free (conv); } void -- cgit 1.4.1