Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[config] Fix handling of hidden modes setting
The make_hidden_modes_string() function claims to return const string, but that is true only as an exception to the rule. Since the callers of the function do not release dynamic memory, this leads to leakage. Also if no mode is hidden, request to unhide something least to that mode getting hidden and hiding something already hidden returns NULL which is rather unintuitive. Fix make_hidden_modes_string() and make all callers of it to release dynamically reserved memory / deal with possible null return value. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information
Showing
1 changed file
with
65 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters