1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Double free memory when netbeans command follows DETACH.
12 Solution: Only free the node when owned. (Xavier de Gaye)
16 *** ../vim-7.3.072/src/netbeans.c 2010-11-16 15:48:57.000000000 +0100
17 --- src/netbeans.c 2010-12-02 16:59:11.000000000 +0100
26 while (head.next != NULL && head.next != &head)
33 head.next = node->next;
34 node->next->prev = node->prev;
37 /* now, parse and execute the commands */
38 nb_parse_cmd(node->buffer);
42 /* buffer finished, dispose of the node and buffer */
43 vim_free(node->buffer);
48 /* more follows, move to the start */
49 STRMOVE(node->buffer, p);
55 head.next = node->next;
56 node->next->prev = node->prev;
61 /* now, parse and execute the commands */
62 nb_parse_cmd(node->buffer);
66 /* buffer finished, dispose of the node and buffer */
67 vim_free(node->buffer);
70 ! /* Check that "head" wasn't changed under our fingers, e.g. when a
71 ! * DETACH command was handled. */
72 ! else if (head.next == node)
74 /* more follows, move to the start */
75 STRMOVE(node->buffer, p);
76 *** ../vim-7.3.072/src/version.c 2010-12-02 16:01:23.000000000 +0100
77 --- src/version.c 2010-12-02 17:00:29.000000000 +0100
81 { /* Add new patch number below this line */
87 If the Universe is constantly expanding, why can't I ever find a parking space?
89 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
90 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
91 \\\ an exciting new programming language -- http://www.Zimbu.org ///
92 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///