free data (order was wrong) and no need to check for free(NULL) - teed - A multiplex relay tee(1) daemon. HTML git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 2a6e3d8d898be6ab1a5ac16b3d288ddef0bc3089 DIR parent 7ea6a417f78562629bd6f579dd593d44a5372acb HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Aug 2023 15:09:23 +0200 free data (order was wrong) and no need to check for free(NULL) Signed-off-by: Christoph Lohmann <20h@r-36.net> Diffstat: M teed.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- DIR diff --git a/teed.c b/teed.c @@ -56,10 +56,8 @@ llist_free1(llist *l) { if (l == NULL) return; - if (l->data != NULL) { - l->data = NULL; - free(l->data); - } + free(l->data); + l->data = NULL; l->next = NULL; l->prev = NULL; free(l);