aboutsummaryrefslogtreecommitdiff
path: root/src/librc
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-26 15:10:26 +0000
committerRoy Marples <roy@marples.name>2008-03-26 15:10:26 +0000
commitcee3ccc4c10e8ba0d1635dd95d8e491435d130bc (patch)
treeacd59a491467d86d5f9a909a7fab02b64c20a0d4 /src/librc
parentf90f2914b927d303d219fb2862f0dbf868be17a3 (diff)
Fix a segfault if rc.conf does not exist, Gentoo #214887
Diffstat (limited to 'src/librc')
-rw-r--r--src/librc/librc-misc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c
index 5c7e3660..25d230cd 100644
--- a/src/librc/librc-misc.c
+++ b/src/librc/librc-misc.c
@@ -203,6 +203,9 @@ char *rc_config_value(RC_STRINGLIST *list, const char *entry)
RC_STRING *line;
char *p;
+ if (!list)
+ return NULL;
+
TAILQ_FOREACH(line, list, entries) {
p = strchr(line->value, '=');
if (p &&