diff mbox series

[2/3] module: ignore NULL type

Message ID 20200720100352.2477-3-kraxel@redhat.com
State New
Headers show
Series [1/3] qxl: fix modular builds with dtrace | expand

Commit Message

Gerd Hoffmann July 20, 2020, 10:03 a.m. UTC
Just return in case module_load_qom_one(NULL) is called.
vga_interface_available() can do that.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 util/module.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/util/module.c b/util/module.c
index 90e9bd42c6c7..0ab00851f0a4 100644
--- a/util/module.c
+++ b/util/module.c
@@ -275,6 +275,9 @@  void module_load_qom_one(const char *type)
 {
     int i;
 
+    if (!type) {
+        return;
+    }
     if (module_loaded_qom_all) {
         return;
     }