aboutsummaryrefslogtreecommitdiffstats
path: root/cfg.c
diff options
context:
space:
mode:
authormjona <mjona@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-02-12 13:16:27 +0000
committermjona <mjona@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2010-02-12 13:16:27 +0000
commit4f3ae24f7c6365082e1bde846a9d39b7a337e228 (patch)
tree3850f8e22a5b367695ffeb360558064b65656fcb /cfg.c
parent555ed9099a1d3f78f059f9906c91022f98660cdc (diff)
downloadlcd4linux-4f3ae24f7c6365082e1bde846a9d39b7a337e228.tar.gz
Fixed a segmentation fault bug in cfg_get().
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1109 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'cfg.c')
-rw-r--r--cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cfg.c b/cfg.c
index fe1a551..c09f34e 100644
--- a/cfg.c
+++ b/cfg.c
@@ -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);