[libvirt] [PATCH] qemud: don't dereference NULL on failed virGetUserDirectory

Richard W.M. Jones rjones at redhat.com
Mon Jan 26 10:57:59 UTC 2009


On Fri, Jan 23, 2009 at 02:23:14PM +0100, Jim Meyering wrote:
> Jim Meyering <jim at meyering.net> wrote:
> > I spotted this while merging my unix_sock_dir changes:
> ...
> >          char *userdir = virGetUserDirectory(NULL, uid);
> > +        if (userdir == NULL) {
> > +            /* give no diagnostic here; virGetUserDirectory reports OOM  */
> 
> It can also fail due to getpwuid_r failure.
> Here's the patch with corrected comment/log:

Updated patch looks OK.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 68 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora




More information about the libvir-list mailing list