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:
mjona
2010-02-12 13:16:27 +00:00
parent 555ed9099a
commit 4f3ae24f7c
+1 -1
View File
@@ -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);