When calling free() we don't need to check if a point is NULL.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
python/sanlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/sanlock.c b/python/sanlock.c
index ed9de0f..4c3e0a0 100644
--- a/python/sanlock.c
+++ b/python/sanlock.c
@@ -1025,11 +1025,11 @@ py_get_lockspaces(PyObject *self __unused, PyObject *args,
PyObject *keywds)
free(lss);
return ls_list;
/* failure */
exit_fail:
- if (lss) free(lss);
+ free(lss);
Py_XDECREF(ls_entry);
Py_XDECREF(ls_list);
return NULL;
}
--
2.17.2