summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexecline/el_substitute.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libexecline/el_substitute.c b/src/libexecline/el_substitute.c
index 9a337fe..daaa7d7 100644
--- a/src/libexecline/el_substitute.c
+++ b/src/libexecline/el_substitute.c
@@ -148,7 +148,6 @@ int el_substitute (stralloc *dst, char const *src, size_t len, char const *vars,
{
subsuinfo_t info = SUBSUINFO_ZERO ;
size_t i = 0 ;
- size_t dstbase = dst->len ;
int nc = 0 ;
int wasnull = !dst->s ;
@@ -179,7 +178,6 @@ int el_substitute (stralloc *dst, char const *src, size_t len, char const *vars,
err :
genalloc_free(elsubsu_t, &info.list) ;
stralloc_free(&info.sa) ;
- if (wasnull) stralloc_free(&info.dst) ; else info.dst.len = dstbase ;
- *dst = info.dst ;
+ stralloc_free(&info.dst) ;
return -1 ;
}