mirror of https://gitee.com/openkylin/libvirt.git
virnetsockettest: Need to initialize 'path'
It was possible to call VIR_FREE in cleanup prior to initialization
This commit is contained in:
parent
9b90644e7d
commit
ff4eac595f
|
@ -207,7 +207,7 @@ static int testSocketUNIXAccept(const void *data ATTRIBUTE_UNUSED)
|
|||
virNetSocketPtr csock = NULL; /* Client socket */
|
||||
int ret = -1;
|
||||
|
||||
char *path;
|
||||
char *path = NULL;
|
||||
char *tmpdir;
|
||||
char template[] = "/tmp/libvirt_XXXXXX";
|
||||
|
||||
|
@ -257,7 +257,7 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
|
|||
virNetSocketPtr csock = NULL; /* Client socket */
|
||||
int ret = -1;
|
||||
|
||||
char *path;
|
||||
char *path = NULL;
|
||||
char *tmpdir;
|
||||
char template[] = "/tmp/libvirt_XXXXXX";
|
||||
|
||||
|
|
Loading…
Reference in New Issue