mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 02:51:16 +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
|
||||
|
@ -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