mirror of
https://github.com/netfun2000/lcd4linux.git
synced 2026-02-27 09:44:34 +08:00
Fixed a segmentation fault bug in cfg_get().
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1109 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
@@ -391,7 +391,7 @@ char *cfg_get(const char *section, const char *key, const char *defval)
|
||||
|
||||
if (expression != NULL) {
|
||||
if (*expression == '\0')
|
||||
return "";
|
||||
return strdup("");
|
||||
if (Compile(expression, &tree) == 0 && Eval(tree, &result) == 0) {
|
||||
retval = strdup(R2S(&result));
|
||||
DelTree(tree);
|
||||
|
||||
Reference in New Issue
Block a user