File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,7 +318,8 @@ json_decode_object(js_read_T *reader, typval_T *res)
318318 goto fail ;
319319 }
320320 di -> di_tv = item ;
321- dict_add (res -> vval .v_dict , di );
321+ if (dict_add (res -> vval .v_dict , di ) == FAIL )
322+ dictitem_free (di );
322323
323324 json_skip_white (reader );
324325 p = reader -> js_buf + reader -> js_used ;
@@ -398,7 +399,10 @@ json_decode_string(js_read_T *reader, typval_T *res)
398399 {
399400 ++ reader -> js_used ;
400401 res -> v_type = VAR_STRING ;
401- res -> vval .v_string = vim_strsave (ga .ga_data );
402+ if (ga .ga_data == NULL )
403+ res -> vval .v_string = NULL ;
404+ else
405+ res -> vval .v_string = vim_strsave (ga .ga_data );
402406 }
403407 else
404408 {
Original file line number Diff line number Diff line change @@ -741,6 +741,8 @@ static char *(features[]) =
741741
742742static int included_patches [] =
743743{ /* Add new patch number below this line */
744+ /**/
745+ 1156 ,
744746/**/
745747 1155 ,
746748/**/
You can’t perform that action at this time.
0 commit comments