From ede612d98b4a3191a1f3242f149091004de78234 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 27 Feb 2007 11:20:39 +0000 Subject: [PATCH] * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Fix memory reallocation. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/ifaddrs.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 252755d4c0..3211c51959 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-02-27 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Fix + memory reallocation. + 2007-02-21 Ulrich Drepper * stdlib/strtod_l.c (____STRTOF_INTERNAL): Add branch predictions diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c index 82495de03e..e43f39f9e3 100644 --- a/sysdeps/unix/sysv/linux/ifaddrs.c +++ b/sysdeps/unix/sysv/linux/ifaddrs.c @@ -1,5 +1,5 @@ /* getifaddrs -- get names and addresses of all network interfaces - Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -195,7 +195,7 @@ __netlink_request (struct netlink_handle *h, int type) char *new_buf = realloc (use_malloc ? buf : NULL, this_buf_size); if (new_buf == NULL) goto out_fail; - new_buf = buf; + buf = new_buf; use_malloc = true; } -- 2.11.4.GIT