From 9a5b3eee5f73594f5e3f71411f6a7d4fe2b9da55 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Mon, 21 Apr 2014 22:54:40 -0300 Subject: Remove OOM test in set_context_in_menu_cmd() --- src/menu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/menu.c') diff --git a/src/menu.c b/src/menu.c index 3a3027d532..f132e6dc2f 100644 --- a/src/menu.c +++ b/src/menu.c @@ -905,9 +905,7 @@ char_u *set_context_in_menu_cmd(expand_T *xp, char_u *cmd, char_u *arg, int forc menu = root_menu; if (after_dot != arg) { - path_name = alloc((unsigned)(after_dot - arg)); - if (path_name == NULL) - return NULL; + path_name = xmalloc(after_dot - arg); vim_strncpy(path_name, arg, after_dot - arg - 1); } name = path_name; -- cgit