Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
85899e35
"doc/QuickStart.html" did not exist on "73287b2b576fa6a1ff1b61467286cbd5458881d2"
Unverified
Commit
85899e35
authored
Apr 19, 2022
by
Moti Cohen
Committed by
GitHub
Apr 18, 2022
Browse files
Fix sdsConfigRewrite() to prevent freeing invalid memory(#10598)
parent
7d1ad6ca
Changes
1
Show whitespace changes
Inline
Side-by-side
src/config.c
View file @
85899e35
...
...
@@ -1848,7 +1848,7 @@ static sds sdsConfigGet(standardConfig *config) {
static void sdsConfigRewrite(standardConfig *config, const char *name, struct rewriteConfigState *state) {
sds val = config->flags & MODULE_CONFIG ? getModuleStringConfig(config->privdata) : *config->data.sds.config;
rewriteConfigSdsOption(state, name, val, config->data.sds.default_value);
if (val) sdsfree(val);
if
(
(val)
&& (config->flags & MODULE_CONFIG))
sdsfree(val);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment