mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] main: move config free into new config_free
method
This commit is contained in:
parent
4dee965fdf
commit
d6805cfa0f
@ -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;
|
||||
|
@ -19,4 +19,5 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#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();
|
||||
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 New Issue
Block a user