Discovered by Coverity. Signed-off-by: Wei Liu <wei.l...@citrix.com> --- Cc: Ian Jackson <ian.jack...@eu.citrix.com> --- tools/libxl/libxl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c index 507ee56c7c..9433693e72 100644 --- a/tools/libxl/libxl_utils.c +++ b/tools/libxl/libxl_utils.c @@ -1017,7 +1017,7 @@ int libxl_get_max_nodes(libxl_ctx *ctx) int libxl__enum_from_string(const libxl_enum_string_table *t, const char *s, int *e) { - if (!t) return ERROR_INVAL; + if (!t || !s) return ERROR_INVAL; for( ; t->s; t++) { if (!strcasecmp(t->s, s)) { -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel