Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix leak when setting the default mode configuration setting.
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Oct 29, 2013
1 parent 75a92b6 commit 0b2c861
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/usb_moded-config.c
Expand Up @@ -345,6 +345,7 @@ int set_config_setting(const char *entry, const char *key, const char *value)
Just a precaution. */
g_key_file_free(settingsfile);
ret = g_file_set_contents(FS_MOUNT_CONFIG_FILE, keyfile, -1, NULL);
g_free(keyfile);

/* g_file_set_contents returns 1 on succes, since set_mode_settings returns 0 on succes we return the ! value */
return(!ret);
Expand Down

0 comments on commit 0b2c861

Please sign in to comment.