From 57ba43e9ed629c2e06435ca56c42ef6f2c5252cf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 9 Oct 2009 20:27:43 +0200 Subject: [PATCH] list_window: don't allow list_window_free(NULL) Also don't clear the list_window object. --- src/list_window.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/list_window.c b/src/list_window.c index ca857b8..6f6c34c 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -50,10 +50,9 @@ list_window_init(WINDOW *w, unsigned width, unsigned height) void list_window_free(struct list_window *lw) { - if (lw) { - memset(lw, 0, sizeof(list_window_t)); - g_free(lw); - } + assert(lw != NULL); + + g_free(lw); } void -- 2.30.2