about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_refresh.c3
-rw-r--r--Src/Zle/zle_tricky.c1
-rw-r--r--Src/hist.c3
3 files changed, 6 insertions, 1 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 8ce678756..80be27f03 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -444,6 +444,7 @@ void
 set_region_highlight(UNUSED(Param pm), char **aval)
 {
     int len;
+    char **av = aval;
     struct region_highlight *rhp;
 
     len = aval ? arrlen(aval) : 0;
@@ -490,6 +491,8 @@ set_region_highlight(UNUSED(Param pm), char **aval)
 
 	match_highlight(strp, &rhp->atr);
     }
+
+    freearray(av);
 }
 
 
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 3c7cff9c1..b916bd653 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -2795,6 +2795,7 @@ doexpandhist(void)
     if (!err) {
 	zlemetacs = excs;
 	if (strcmp(zlemetaline, ol)) {
+	    zle_restore_positions();
 	    unmetafy_line();
 	    /* For vi mode -- reset the beginning-of-insertion pointer   *
 	     * to the beginning of the line.  This seems a little silly, *
diff --git a/Src/hist.c b/Src/hist.c
index 1845bd8ad..16249125b 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1764,7 +1764,8 @@ chrealpath(char **junkptr)
 	str++;
     }
 
-    *junkptr = metafy(bicat(real, nonreal), -1, META_HEAPDUP);
+    *junkptr = metafy(str = bicat(real, nonreal), -1, META_HEAPDUP);
+    zsfree(str);
 #ifdef HAVE_CANONICALIZE_FILE_NAME
     free(real);
 #endif