Code

list_window: don't allow list_window_free(NULL)
authorMax Kellermann <max@duempel.org>
Fri, 9 Oct 2009 18:27:43 +0000 (20:27 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 9 Oct 2009 18:27:43 +0000 (20:27 +0200)
Also don't clear the list_window object.

src/list_window.c

index ca857b8a06ec60185e3d9d334c318d084b881b55..6f6c34cbd625b8571deeabe236263348be165bcd 100644 (file)
@@ -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