aboutsummaryrefslogtreecommitdiff
path: root/posix/wordexp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-31 13:33:18 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-31 13:33:18 +0000
commit32c075e1f01849e161724bbd400ba77244e482cc (patch)
tree5f083a3f352104f32bb6c902d57fa3f294bd8d4d /posix/wordexp.c
parentd6220e9ee38c1c9285221b023346201ec5f511b3 (diff)
downloadglibc-32c075e1f01849e161724bbd400ba77244e482cc.zip
glibc-32c075e1f01849e161724bbd400ba77244e482cc.tar.gz
glibc-32c075e1f01849e161724bbd400ba77244e482cc.tar.bz2
.
Diffstat (limited to 'posix/wordexp.c')
-rw-r--r--posix/wordexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/wordexp.c b/posix/wordexp.c
index 765d14d..adece95 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -1809,7 +1809,7 @@ envsubst:
/* Substitute parameter */
break;
- if (free_value)
+ if (free_value && value)
free (value);
if (!colon_seen && value)
@@ -1827,7 +1827,7 @@ envsubst:
case ACT_NONNULL_SUBST:
if (value && (*value || !colon_seen))
{
- if (free_value)
+ if (free_value && value)
free (value);
value = pattern ? __strdup (pattern) : pattern;