Patch 8.0.0170 (after 8.0.0169)
Summary:    crash in channel test
Problem:    Channel test fails for using freed memory.
Solution:   Fix memory use in json_decode().
Files:      src/json.c


*** ../vim-8.0.0169/src/json.c  2017-01-10 19:44:14.594027155 +0100
--- src/json.c  2017-01-10 22:52:50.684942313 +0100
***************
*** 577,582 ****
--- 577,584 ----
      ga_init2(&stack, sizeof(json_dec_item_T), 100);
      cur_item = res;
      init_tv(&item);
+     if (res != NULL)
+     init_tv(res);
  
      fill_numbuflen(reader);
      p = reader->js_buf + reader->js_used;
***************
*** 985,991 ****
  
  theend:
      ga_clear(&stack);
-     clear_tv(&item);
      return retval;
  }
  
--- 987,992 ----
*** ../vim-8.0.0169/src/version.c       2017-01-10 19:44:14.594027155 +0100
--- src/version.c       2017-01-10 22:56:53.935190921 +0100
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     170,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
243. You unsuccessfully try to download a pizza from www.dominos.com.

 /// 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