diff --git a/VERSION b/VERSION index abafaf95..05ac145c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-133-g35094a57cb+1 \ No newline at end of file +a12-134-g4dee965fdf+1 \ No newline at end of file diff --git a/client/src/config.c b/client/src/config.c index 621581ae..7f758225 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -337,6 +337,21 @@ bool config_load(int argc, char * argv[]) return true; } +void config_free() +{ + free(params.shmFile ); + free(params.spiceHost ); + free(params.windowTitle); + + for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i) + { + RendererOpts * opts = ¶ms.rendererOpts[i]; + for(unsigned int j = 0; j < opts->argc; ++j) + free(opts->argv[j].value); + free(opts->argv); + } +} + static bool load(const char * configFile) { config_t cfg; diff --git a/client/src/config.h b/client/src/config.h index 242a7920..45457a71 100644 --- a/client/src/config.h +++ b/client/src/config.h @@ -19,4 +19,5 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include -bool config_load(int argc, char * argv[]); \ No newline at end of file +bool config_load(int argc, char * argv[]); +void config_free(); \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index 8bc4b87e..14b43240 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1303,15 +1303,6 @@ int main(int argc, char * argv[]) const int ret = run(); release_key_binds(); - free(params.shmFile); - free(params.spiceHost); - for(unsigned int i = 0; i < LG_RENDERER_COUNT; ++i) - { - RendererOpts * opts = ¶ms.rendererOpts[i]; - for(unsigned int j = 0; j < opts->argc; ++j) - free(opts->argv[j].value); - free(opts->argv); - } - + config_free(); return ret; } \ No newline at end of file