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 --- plugins/python/python.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'plugins/python') 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; } -- cgit 1.4.1