src/head/wr_server.c in webroar-0.2.2 vs src/head/wr_server.c in webroar-0.2.3

- old
+ new

@@ -1,7 +1,7 @@ /* WebROaR - Ruby Application Server - http://webroar.in/ - * Copyright (C) 2009 WebROaR + * Copyright (C) 2009 Goonj LLC * * This file is part of WebROaR. * * WebROaR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,10 +153,11 @@ (*server)->on_app_remove = wr_app_remove_cb; (*server)->on_app_reload = wr_app_reload_cb; (*server)->on_wkr_add = wr_wkr_add_cb; (*server)->on_wkr_remove = wr_wkr_remove_cb; (*server)->on_wkr_ping = wr_wkr_ping_cb; + (*server)->default_app = (*server)->static_app = NULL; return 0; } /** Destroy Server */ @@ -175,9 +176,14 @@ // Destroy application list if(server->apps) { wr_app_free(server->apps); + server->apps = NULL; + } + + if(server->static_app) { + wr_app_free(server->static_app); server->apps = NULL; } //Destroy Server Control object wr_svr_ctl_free(server->ctl);