diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-05 23:37:40 +0200 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-09-18 11:37:16 -0700 |
commit | 7bd16c28e51c92f58f9415ea05dda039df706d5a (patch) | |
tree | c0e916ebf2cbc343bd26fa4925141b004e7b0d64 /libc/inet/ifaddrs.c | |
parent | 276d3e4e98371c6988f39b3167fe651d6ff3068c (diff) | |
download | uClibc-alpine-7bd16c28e51c92f58f9415ea05dda039df706d5a.tar.bz2 uClibc-alpine-7bd16c28e51c92f58f9415ea05dda039df706d5a.tar.xz |
do not save/restore errno around free() calls
In any non-buggy program free() does not fail.
And when it fails in a buggy program, the failure
is usually fatal (heap corruption and segfault).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/inet/ifaddrs.c')
-rw-r--r-- | libc/inet/ifaddrs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libc/inet/ifaddrs.c b/libc/inet/ifaddrs.c index 1d54d5123..77ca7ce02 100644 --- a/libc/inet/ifaddrs.c +++ b/libc/inet/ifaddrs.c @@ -81,7 +81,6 @@ void __netlink_free_handle (struct netlink_handle *h) { struct netlink_res *ptr; - int saved_errno = errno; ptr = h->nlm_list; while (ptr != NULL) @@ -89,11 +88,9 @@ __netlink_free_handle (struct netlink_handle *h) struct netlink_res *tmpptr; tmpptr = ptr->next; - free (ptr); + free (ptr); /* doesn't affect errno */ ptr = tmpptr; } - - __set_errno (saved_errno); } |