mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -1503,7 +1503,7 @@ virCommandAddArg(virCommandPtr cmd, const char *val)
|
||||
|
||||
if (val == NULL) {
|
||||
cmd->has_error = EINVAL;
|
||||
abort();
|
||||
return;
|
||||
}
|
||||
|
||||
arg = g_strdup(val);
|
||||
|
||||
Reference in New Issue
Block a user