mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
[client] main: move config free into new config_free
method
This commit is contained in:
parent
4dee965fdf
commit
d6805cfa0f
4 changed files with 19 additions and 12 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
a12-133-g35094a57cb+1
|
||||
a12-134-g4dee965fdf+1
|
|
@ -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;
|
||||
|
|
|
@ -20,3 +20,4 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
#include <stdbool.h>
|
||||
|
||||
bool config_load(int argc, char * argv[]);
|
||||
void config_free();
|
|
@ -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;
|
||||
}
|
Loading…
Reference in a new issue