X-Git-Url: http://git.subgeniuskitty.com/screensavers/.git/blobdiff_plain/fbe4ccaea6e02bebf67dc5d4cd607a6f6c263c2e..d87b1e06771aeb63ff43f5a289b19563d9af0eb0:/hacks/NEDsim/NEDsim.c diff --git a/hacks/NEDsim/NEDsim.c b/hacks/NEDsim/NEDsim.c index 2b576f0..73c72f9 100644 --- a/hacks/NEDsim/NEDsim.c +++ b/hacks/NEDsim/NEDsim.c @@ -677,8 +677,16 @@ NEDsim_event(Display * dpy, Window win, void * closure, XEvent * event) static void NEDsim_free(Display * dpy, Window win, void * closure) { - // TODO: Replace all this with proper code to free everything. struct NEDsim * nedsim = closure; + + if (nedsim->nedstate != NULL) { + free(nedsim->nedstate->active_thread->psw); + free(nedsim->nedstate->active_thread); + free(nedsim->nedstate->hack); + free(nedsim->nedstate); + } + + // TODO: Replace all this with proper code to free everything related to the screensaver itself. XFreeGC(nedsim->dpy, nedsim->gc); free(nedsim); }