diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-09-28 23:41:09 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-09-28 23:41:09 +0200 |
commit | dd36de4d520fc77f0e2ea83f560040d36be3ee50 (patch) | |
tree | 6b9b5da9b74280bddc22e02cfa8bfb47b2c64406 /src/util.c | |
parent | 34c8deaae1fcfa9e7c9db49b5f3a33973e103218 (diff) |
parse_env_file() - return empty value strings like FOO="" as NULL value
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index 0939ea9456..ce8695be25 100644 --- a/src/util.c +++ b/src/util.c @@ -653,6 +653,12 @@ int parse_env_file( goto fail; } + if (v[0] == '\0') { + /* return empty value strings as NULL */ + free(v); + v = NULL; + } + free(*value); *value = v; |