|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 01/10] libxl: don't check s!=NULL in libxl__abs_path
That argument should not be NULL. Let subsequent dereferencing crashes
the process.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
tools/libxl/libxl_internal.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 42d548e..24a0901 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -233,8 +233,7 @@ void libxl__log(libxl_ctx *ctx, xentoollog_level msglevel,
int errnoval,
char *libxl__abs_path(libxl__gc *gc, const char *s, const char *path)
{
- if (!s || s[0] == '/')
- return libxl__strdup(gc, s);
+ if (s[0] == '/') return libxl__strdup(gc, s);
return libxl__sprintf(gc, "%s/%s", path, s);
}
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |