summary refs log tree commit diff stats
path: root/src/common/text.c
diff options
context:
space:
mode:
authorArnavion <arnavion@gmail.com>2014-12-08 21:24:59 -0800
committerArnavion <arnavion@gmail.com>2014-12-08 21:24:59 -0800
commit65da34f19eab5edde0615ccc4a58be1947cfce6e (patch)
treed7859d3241ec8c91cca590d8ec96f38fc6a7c52e /src/common/text.c
parentb7afcc36321b9a61b208f9cd4071f60a3894c1cf (diff)
Removed some unnecessary null-checks for calls to g_free and g_strfreev
Diffstat (limited to 'src/common/text.c')
-rw-r--r--src/common/text.c10
1 files changed, 4 insertions, 6 deletions
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