Patch 7.4.2327
Problem:    Freeing a variable that is on the stack.
Solution:   Don't free res_tv or err_tv. (Ozaki Kiichi)
Files:      src/channel.c


*** ../vim-7.4.2326/src/channel.c       2016-09-01 15:11:13.544265437 +0200
--- src/channel.c       2016-09-04 20:40:17.984927934 +0200
***************
*** 2142,2148 ****
        }
        else
        {
!           typval_T    *tv;
            typval_T    res_tv;
            typval_T    err_tv;
            char_u      *json = NULL;
--- 2142,2148 ----
        }
        else
        {
!           typval_T    *tv = NULL;
            typval_T    res_tv;
            typval_T    err_tv;
            char_u      *json = NULL;
***************
*** 2159,2166 ****
                ch_logs(channel, "Calling '%s'", (char *)arg);
                if (func_call(arg, &argv[2], NULL, NULL, &res_tv) == OK)
                    tv = &res_tv;
-               else
-                   tv = NULL;
            }
  
            if (argv[id_idx].v_type == VAR_NUMBER)
--- 2159,2164 ----
***************
*** 2174,2184 ****
                    /* If evaluation failed or the result can't be encoded
                     * then return the string "ERROR". */
                    vim_free(json);
-                   free_tv(tv);
                    err_tv.v_type = VAR_STRING;
                    err_tv.vval.v_string = (char_u *)"ERROR";
!                   tv = &err_tv;
!                   json = json_encode_nr_expr(id, tv, options | JSON_NL);
                }
                if (json != NULL)
                {
--- 2172,2180 ----
                    /* If evaluation failed or the result can't be encoded
                     * then return the string "ERROR". */
                    vim_free(json);
                    err_tv.v_type = VAR_STRING;
                    err_tv.vval.v_string = (char_u *)"ERROR";
!                   json = json_encode_nr_expr(id, &err_tv, options | JSON_NL);
                }
                if (json != NULL)
                {
***************
*** 2191,2197 ****
            --emsg_skip;
            if (tv == &res_tv)
                clear_tv(tv);
!           else if (tv != &err_tv)
                free_tv(tv);
        }
      }
--- 2187,2193 ----
            --emsg_skip;
            if (tv == &res_tv)
                clear_tv(tv);
!           else
                free_tv(tv);
        }
      }
*** ../vim-7.4.2326/src/version.c       2016-09-04 20:34:55.767537370 +0200
--- src/version.c       2016-09-04 20:41:38.216277832 +0200
***************
*** 765,766 ****
--- 765,768 ----
  {   /* Add new patch number below this line */
+ /**/
+     2327,
  /**/

-- 
"Hit any key to continue" does _not_ mean you can hit the on/off button!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui