mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-11 06:43:56 +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;
|
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)
|
static bool load(const char * configFile)
|
||||||
{
|
{
|
||||||
config_t cfg;
|
config_t cfg;
|
||||||
|
|
|
@ -19,4 +19,5 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
bool config_load(int argc, char * argv[]);
|
bool config_load(int argc, char * argv[]);
|
||||||
|
void config_free();
|
|
@ -1303,15 +1303,6 @@ int main(int argc, char * argv[])
|
||||||
const int ret = run();
|
const int ret = run();
|
||||||
release_key_binds();
|
release_key_binds();
|
||||||
|
|
||||||
free(params.shmFile);
|
config_free();
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
Loading…
Reference in a new issue