Commit a5429b61 authored by Laurent Aimar's avatar Laurent Aimar

Fixed a potential double free if an error occurs while saving the configuration.

parent 37e0b5b4
...@@ -700,7 +700,6 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, ...@@ -700,7 +700,6 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
* Restore old settings from the config in file * Restore old settings from the config in file
*/ */
fputs( p_bigbuffer, file ); fputs( p_bigbuffer, file );
free( p_bigbuffer );
/* /*
* Flush to disk and replace atomically * Flush to disk and replace atomically
...@@ -738,6 +737,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, ...@@ -738,6 +737,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
free (temporary); free (temporary);
free (permanent); free (permanent);
free( p_bigbuffer );
return 0; return 0;
error: error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment