From: Max Kellermann Date: Fri, 9 Oct 2009 18:27:43 +0000 (+0200) Subject: list_window: don't allow list_window_free(NULL) X-Git-Tag: release-0.16~160 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=57ba43e9ed629c2e06435ca56c42ef6f2c5252cf;p=ncmpc.git list_window: don't allow list_window_free(NULL) Also don't clear the list_window object. --- 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