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:
Ryan McCabe 2012-10-17 11:34:43 -04:00
parent 7774713dce
commit 10df3451a6

View File

@ -108,7 +108,7 @@ domain_sock_setup(const char *domain, const char *socket_path)
free(sun);
sun = NULL;
node = malloc(sizeof(*node));
node = calloc(1, sizeof(*node));
if (!node)
goto out_fail;