mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
virCommandAddArg: Don't abort on invalid input
Commit 912c6b22fc
added abort() when the
'val' parameter is NULL along with setting the error variable for the
command. We don't want to abort in this case, just set the error.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a42b46dd7d
commit
6a252ab4d1
@ -1503,7 +1503,7 @@ virCommandAddArg(virCommandPtr cmd, const char *val)
|
||||
|
||||
if (val == NULL) {
|
||||
cmd->has_error = EINVAL;
|
||||
abort();
|
||||
return;
|
||||
}
|
||||
|
||||
arg = g_strdup(val);
|
||||
|
Loading…
Reference in New Issue
Block a user