mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Do not check return value of VIR_REALLOC_N
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
@@ -2582,8 +2582,7 @@ vshReadlineCommandGenerator(void)
|
||||
if (cmds[cmd_list_index].flags & VSH_CMD_FLAG_ALIAS)
|
||||
continue;
|
||||
|
||||
if (VIR_REALLOC_N(ret, ret_size + 2) < 0)
|
||||
return NULL;
|
||||
VIR_REALLOC_N(ret, ret_size + 2);
|
||||
|
||||
ret[ret_size] = g_strdup(name);
|
||||
ret_size++;
|
||||
@@ -2630,8 +2629,7 @@ vshReadlineOptionsGenerator(const vshCmdDef *cmd,
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
if (VIR_REALLOC_N(ret, ret_size + 2) < 0)
|
||||
return NULL;
|
||||
VIR_REALLOC_N(ret, ret_size + 2);
|
||||
|
||||
ret[ret_size] = g_strdup_printf("--%s", name);
|
||||
ret_size++;
|
||||
|
||||
Reference in New Issue
Block a user