summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-08-12 22:26:56 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-08-12 22:26:56 +0200
commitf92ddc009df4f8bebca7eeb7235b3814de8b5519 (patch)
tree612bf7c2adf3fa8f9cb35fcf27ea6acf2259adaf
parent0e89f9c30f4567a7322c1ec0f307dd691e4a2207 (diff)
downloadnetlink-notify-f92ddc009df4f8bebca7eeb7235b3814de8b5519.tar.gz
netlink-notify-f92ddc009df4f8bebca7eeb7235b3814de8b5519.tar.zst
do net free interface name
-rw-r--r--netlink-notify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/netlink-notify.c b/netlink-notify.c
index f9c45ee..d2df50b 100644
--- a/netlink-notify.c
+++ b/netlink-notify.c
@@ -371,7 +371,8 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) {
icon = ICON_NETWORK_AWAY;
free_chain(&addresses_seen[ifi->ifi_index]);
- free(name[ifi->ifi_index]);
+ /* do not free name[ifi->ifi_index] here ... Looks like some drivers send
+ * RTM_NEWLINK (for a last link down) after the device has gone away... */
break;
default: