fence-virt: Fix free of uninitialized variable
Fix a possible free() of an uninitialized struct member in the error path that's hit in an OOM situation. Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
This commit is contained in:
parent
7774713dce
commit
10df3451a6
@ -108,7 +108,7 @@ domain_sock_setup(const char *domain, const char *socket_path)
|
|||||||
free(sun);
|
free(sun);
|
||||||
sun = NULL;
|
sun = NULL;
|
||||||
|
|
||||||
node = malloc(sizeof(*node));
|
node = calloc(1, sizeof(*node));
|
||||||
if (!node)
|
if (!node)
|
||||||
goto out_fail;
|
goto out_fail;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user