Message ID | 20220815172056.37ec14c8@gandalf.local.home (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | trace-cmd: Do not return zero length name for guest by name | expand |
diff --git a/tracecmd/trace-vm.c b/tracecmd/trace-vm.c index 09bd60259258..f78f1d83386b 100644 --- a/tracecmd/trace-vm.c +++ b/tracecmd/trace-vm.c @@ -35,7 +35,7 @@ static struct trace_guest *get_guest_by_name(const char *name) { int i; - if (!guests) + if (!guests || !strlen(name)) return NULL; for (i = 0; i < guests_len; i++)