mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
qemud: don't dereference NULL on failed virGetUserDirectory
* qemud/qemud.c (qemudInitPaths): Return right away, upon virGetUserDirectory failure.
This commit is contained in:
parent
3b22f80f07
commit
7523642c01
@ -1,3 +1,9 @@
|
||||
Fri Jan 23 14:22:03 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
qemud: don't dereference NULL on failed virGetUserDirectory
|
||||
* qemud/qemud.c (qemudInitPaths): Return right away,
|
||||
upon virGetUserDirectory failure.
|
||||
|
||||
Fri Jan 23 14:30:59 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
m4: update from gnulib to avoid warnings from cutting-edge autoconf
|
||||
@ -72,7 +78,7 @@ Thu Jan 22 20:17:35 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
Thu Jan 22 10:35:03 PST 2009 John Levon <john.levon@sun.com>
|
||||
|
||||
* gnulib/tests/.cvsignore: add test-random_r
|
||||
* gnulib/tests/.cvsignore: add test-random_r
|
||||
* Makefile.maint: generate .hgignore
|
||||
|
||||
* gnulib/tests/.gitignore, .hgignore, m4/.gitignore: regenerate
|
||||
|
@ -719,6 +719,10 @@ static int qemudInitPaths(struct qemud_server *server,
|
||||
goto snprintf_error;
|
||||
} else {
|
||||
char *userdir = virGetUserDirectory(NULL, uid);
|
||||
if (userdir == NULL) {
|
||||
/* Do not diagnose here; virGetUserDirectory does that. */
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (snprintf(sockname, maxlen, "@%s/.libvirt/libvirt-sock", userdir) >= maxlen) {
|
||||
VIR_FREE(userdir);
|
||||
|
Loading…
Reference in New Issue
Block a user