Fix use of uninitialized variable
This commit is contained in:
parent
449282f2e0
commit
6da36183ee
@ -1,3 +1,8 @@
|
|||||||
|
2014-03-25 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Add out_fail2
|
||||||
|
label to be used after in6ailist is initialized.
|
||||||
|
|
||||||
2014-03-20 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
2014-03-20 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
|
* nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
|
||||||
|
@ -182,10 +182,10 @@ make_request (int fd, pid_t pid)
|
|||||||
|
|
||||||
ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
|
ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
|
||||||
if (read_len < 0)
|
if (read_len < 0)
|
||||||
goto out_fail;
|
goto out_fail2;
|
||||||
|
|
||||||
if (msg.msg_flags & MSG_TRUNC)
|
if (msg.msg_flags & MSG_TRUNC)
|
||||||
goto out_fail;
|
goto out_fail2;
|
||||||
|
|
||||||
struct nlmsghdr *nlmh;
|
struct nlmsghdr *nlmh;
|
||||||
for (nlmh = (struct nlmsghdr *) buf;
|
for (nlmh = (struct nlmsghdr *) buf;
|
||||||
@ -251,7 +251,7 @@ make_request (int fd, pid_t pid)
|
|||||||
{
|
{
|
||||||
newp = malloc (sizeof (*newp));
|
newp = malloc (sizeof (*newp));
|
||||||
if (newp == NULL)
|
if (newp == NULL)
|
||||||
goto out_fail;
|
goto out_fail2;
|
||||||
newp->use_malloc = true;
|
newp->use_malloc = true;
|
||||||
}
|
}
|
||||||
newp->info.flags = (((ifam->ifa_flags
|
newp->info.flags = (((ifam->ifa_flags
|
||||||
@ -289,7 +289,7 @@ make_request (int fd, pid_t pid)
|
|||||||
result = malloc (sizeof (*result)
|
result = malloc (sizeof (*result)
|
||||||
+ in6ailistlen * sizeof (struct in6addrinfo));
|
+ in6ailistlen * sizeof (struct in6addrinfo));
|
||||||
if (result == NULL)
|
if (result == NULL)
|
||||||
goto out_fail;
|
goto out_fail2;
|
||||||
|
|
||||||
result->timestamp = get_nl_timestamp ();
|
result->timestamp = get_nl_timestamp ();
|
||||||
result->usecnt = 2;
|
result->usecnt = 2;
|
||||||
@ -319,7 +319,7 @@ make_request (int fd, pid_t pid)
|
|||||||
free (buf);
|
free (buf);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
out_fail:
|
out_fail2:
|
||||||
while (in6ailist != NULL)
|
while (in6ailist != NULL)
|
||||||
{
|
{
|
||||||
struct in6ailist *next = in6ailist->next;
|
struct in6ailist *next = in6ailist->next;
|
||||||
@ -327,6 +327,7 @@ make_request (int fd, pid_t pid)
|
|||||||
free (in6ailist);
|
free (in6ailist);
|
||||||
in6ailist = next;
|
in6ailist = next;
|
||||||
}
|
}
|
||||||
|
out_fail:
|
||||||
if (use_malloc)
|
if (use_malloc)
|
||||||
free (buf);
|
free (buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user