diff options
author | Andreas Schwab <schwab@suse.de> | 2014-03-25 08:51:59 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2014-03-25 15:17:08 +0100 |
commit | 6da36183eeb86e5cbd29b8281180d56352284ad2 (patch) | |
tree | 8116ea633902f3cd40fd7f9ae178bb1315a472f8 /sysdeps | |
parent | 449282f2e0e850c29f6a9666058503d4734964f0 (diff) | |
download | glibc-6da36183eeb86e5cbd29b8281180d56352284ad2.zip glibc-6da36183eeb86e5cbd29b8281180d56352284ad2.tar.gz glibc-6da36183eeb86e5cbd29b8281180d56352284ad2.tar.bz2 |
Fix use of uninitialized variable
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/check_pf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c index 6d8468d..e6a12ed 100644 --- a/sysdeps/unix/sysv/linux/check_pf.c +++ b/sysdeps/unix/sysv/linux/check_pf.c @@ -182,10 +182,10 @@ make_request (int fd, pid_t pid) ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); if (read_len < 0) - goto out_fail; + goto out_fail2; if (msg.msg_flags & MSG_TRUNC) - goto out_fail; + goto out_fail2; struct nlmsghdr *nlmh; for (nlmh = (struct nlmsghdr *) buf; @@ -251,7 +251,7 @@ make_request (int fd, pid_t pid) { newp = malloc (sizeof (*newp)); if (newp == NULL) - goto out_fail; + goto out_fail2; newp->use_malloc = true; } newp->info.flags = (((ifam->ifa_flags @@ -289,7 +289,7 @@ make_request (int fd, pid_t pid) result = malloc (sizeof (*result) + in6ailistlen * sizeof (struct in6addrinfo)); if (result == NULL) - goto out_fail; + goto out_fail2; result->timestamp = get_nl_timestamp (); result->usecnt = 2; @@ -319,7 +319,7 @@ make_request (int fd, pid_t pid) free (buf); return result; - out_fail: + out_fail2: while (in6ailist != NULL) { struct in6ailist *next = in6ailist->next; @@ -327,6 +327,7 @@ make_request (int fd, pid_t pid) free (in6ailist); in6ailist = next; } + out_fail: if (use_malloc) free (buf); return NULL; |