summary refs log tree commit diff stats
path: root/plugins/python
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 /plugins/python
parentb7afcc36321b9a61b208f9cd4071f60a3894c1cf (diff)
Removed some unnecessary null-checks for calls to g_free and g_strfreev
Diffstat (limited to 'plugins/python')
-rw-r--r--plugins/python/python.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 0ce6ad6e..d662557d 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -449,10 +449,8 @@ Util_BuildEOLList(char *word[])
 		PyList_SetItem(list, i - 1, uni_part);
 	}
 
-	if (last)
-		g_free (last);
-	if (accum)
-		g_free (accum);
+	g_free (last);
+	g_free (accum);
 
 	return list;
 }
@@ -1465,8 +1463,7 @@ Plugin_RemoveHook(PyObject *plugin, Hook *hook)
 					       hook));
 		Py_DECREF(hook->callback);
 		Py_DECREF(hook->userdata);
-		if (hook->name)
-			g_free(hook->name);
+		g_free(hook->name);
 		g_free(hook);
 	}
 }
@@ -1485,8 +1482,7 @@ Plugin_RemoveAllHooks(PyObject *plugin)
 		}
 		Py_DECREF(hook->callback);
 		Py_DECREF(hook->userdata);
-		if (hook->name)
-			g_free(hook->name);
+		g_free(hook->name);
 		g_free(hook);
 		list = list->next;
 	}