]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 26 Jul 2004 15:22:56 +0000 (15:22 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 26 Jul 2004 15:22:56 +0000 (15:22 +0000)
2004-07-26  Ulrich Drepper  <drepper@redhat.com>

* sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Assign pointer for
new buffer at the right time.
Reported by Jakub Bogusz <qboosh@pld-linux.org>.

ChangeLog
sysdeps/unix/sysv/linux/ifreq.c

index e0b4230a84dc5b82545829fded0e15a25f96f40a..ddd4c44b39499c69212acce70df38a08e6a07db3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-26  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Assign pointer for
+       new buffer at the right time.
+       Reported by Jakub Bogusz <qboosh@pld-linux.org>.
+
 2004-07-25  Ulrich Drepper  <drepper@redhat.com>
 
        * inet/Versions [libc, GLIBC_2.3.4]: Add getipv4sourcefilter,
index b93cd56eab242710010fb9400d700f84403c5a76..098f11750ffa6f2b96c263dd35dbdfa082aa14a5 100644 (file)
@@ -71,7 +71,8 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
     {
       ifc.ifc_len = rq_len;
       void *newp = realloc (ifc.ifc_buf, ifc.ifc_len);
-      if (newp == NULL || __ioctl (fd, SIOCGIFCONF, &ifc) < 0)
+      if (newp == NULL
+         || (ifc.ifc_buf = newp, __ioctl (fd, SIOCGIFCONF, &ifc)) < 0)
        {
          free (ifc.ifc_buf);
 
@@ -82,7 +83,6 @@ __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
          *ifreqs = NULL;
          return;
        }
-      ifc.ifc_buf = newp;
 
       if (!old_siocgifconf || ifc.ifc_len < rq_len)
        break;