CLEANUP: Stop checking the pointer before calling `ring_free()`
Changes performed with this Coccinelle patch:
@@
expression e;
@@
- if (e != NULL) {
ring_free(e);
- }
@@
expression e;
@@
- if (e) {
ring_free(e);
- }
@@
expression e;
@@
- if (e)
ring_free(e);
@@
expression e;
@@
- if (e != NULL)
ring_free(e);
diff --git a/src/sink.c b/src/sink.c
index 55b6ad1..af0e891 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -1164,8 +1164,7 @@
free(sft);
if (sink) {
- if (sink->ctx.ring)
- ring_free(sink->ctx.ring);
+ ring_free(sink->ctx.ring);
LIST_DELETE(&sink->sink_list);
free(sink->name);