Skip to content

Commit 930799a

Browse files
committed
updated for version 7.3.730
Problem: Crash in PHP file when using syntastic. (Ike Devolder) Solution: Avoid using NULL pointer. (Christian Brabandt)
1 parent 06fac2d commit 930799a

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/quickfix.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -898,20 +898,14 @@ qf_new_list(qi, qf_title, wp)
898898
* way with ":grep'.
899899
*/
900900
while (qi->qf_listcount > qi->qf_curlist + 1)
901-
{
902-
if (wp != NULL && wp->w_llist == qi)
903-
wp->w_llist = NULL;
904901
qf_free(qi, --qi->qf_listcount);
905-
}
906902

907903
/*
908904
* When the stack is full, remove to oldest entry
909905
* Otherwise, add a new entry.
910906
*/
911907
if (qi->qf_listcount == LISTCOUNT)
912908
{
913-
if (wp != NULL && wp->w_llist == qi)
914-
wp->w_llist = NULL;
915909
qf_free(qi, 0);
916910
for (i = 1; i < LISTCOUNT; ++i)
917911
qi->qf_lists[i - 1] = qi->qf_lists[i];
@@ -2135,9 +2129,12 @@ qf_free(qi, idx)
21352129
while (qi->qf_lists[idx].qf_count)
21362130
{
21372131
qfp = qi->qf_lists[idx].qf_start->qf_next;
2138-
vim_free(qi->qf_lists[idx].qf_start->qf_text);
2139-
vim_free(qi->qf_lists[idx].qf_start->qf_pattern);
2140-
vim_free(qi->qf_lists[idx].qf_start);
2132+
if (qi->qf_lists[idx].qf_title != NULL)
2133+
{
2134+
vim_free(qi->qf_lists[idx].qf_start->qf_text);
2135+
vim_free(qi->qf_lists[idx].qf_start->qf_pattern);
2136+
vim_free(qi->qf_lists[idx].qf_start);
2137+
}
21412138
qi->qf_lists[idx].qf_start = qfp;
21422139
--qi->qf_lists[idx].qf_count;
21432140
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ static char *(features[]) =
725725

726726
static int included_patches[] =
727727
{ /* Add new patch number below this line */
728+
/**/
729+
730,
728730
/**/
729731
729,
730732
/**/

0 commit comments

Comments
 (0)