File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9324,21 +9324,16 @@ f_readdir(typval_T *argvars, typval_T *rettv)
93249324 }
93259325#endif
93269326
9327- rettv -> vval .v_list = list_alloc ();
9328- if (!failed && rettv -> vval .v_list != NULL )
9327+ if (!failed && rettv -> vval .v_list != NULL && ga .ga_len > 0 )
93299328 {
9330- ++ rettv -> vval .v_list -> lv_refcount ;
93319329 sort_strings ((char_u * * )ga .ga_data , ga .ga_len );
93329330 for (i = 0 ; i < ga .ga_len ; i ++ )
93339331 {
93349332 p = ((char_u * * )ga .ga_data )[i ];
93359333 list_append_string (rettv -> vval .v_list , p , -1 );
93369334 }
93379335 }
9338- for (i = 0 ; i < ga .ga_len ; i ++ )
9339- vim_free (((char_u * * )ga .ga_data )[i ]);
9340-
9341- ga_clear (& ga );
9336+ ga_clear_strings (& ga );
93429337}
93439338
93449339/*
Original file line number Diff line number Diff line change @@ -771,6 +771,8 @@ static char *(features[]) =
771771
772772static int included_patches [] =
773773{ /* Add new patch number below this line */
774+ /**/
775+ 1186 ,
774776/**/
775777 1185 ,
776778/**/
You can’t perform that action at this time.
0 commit comments