On 02/01/2010 10:12 AM, Daniel Veillard wrote: >> diff --git a/src/util/util.c b/src/util/util.c >> index 0ce5026..394ef35 100644 >> --- a/src/util/util.c >> +++ b/src/util/util.c >> @@ -1114,6 +1114,19 @@ char *virFindFileInPath(const char *file) >> char *pathseg; >> char fullpath[PATH_MAX]; >> >> + if (file == NULL) >> + return NULL; >> + >> + /* if we are passed an absolute path (starting with /), return a >> + * copy of that path >> + */ >> + if (file[0] == '/') { >> + if (virFileExists(file)) >> + return strdup(file); >> + else >> + return NULL; >> + } >> + >> /* copy PATH env so we can tweak it */ >> if (virStrcpyStatic(pathenv, getenv("PATH")) == NULL) >> return NULL; > > ACK, makes sense ! Thanks, pushed. -- Chris Lalancette -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list