diff options
author | Thomas Habets <thomas@habets.se> | 2012-11-16 10:52:24 +0000 |
---|---|---|
committer | Thomas Habets <thomas@habets.se> | 2012-11-16 21:00:13 +0000 |
commit | 2e724b2f5cd614d7362f8dcbc57dc1fca6e437b3 (patch) | |
tree | ce6a5eb6534ebda8fd56b2a02cb4920a9ab4197e | |
parent | 70a3af487c60147af17af6819ec1c7a9e96b2b73 (diff) | |
download | libnet-2e724b2f5cd614d7362f8dcbc57dc1fca6e437b3.tar.gz |
Properly set l->err_buf if libnet_ifaddrlist() fails.
-rw-r--r-- | libnet/src/libnet_if_addr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libnet/src/libnet_if_addr.c b/libnet/src/libnet_if_addr.c index ea9cf94..7e0a2a6 100644 --- a/libnet/src/libnet_if_addr.c +++ b/libnet/src/libnet_if_addr.c @@ -334,7 +334,6 @@ int libnet_select_device(libnet_t *l) { int c, i; - char err_buf[LIBNET_ERRBUF_SIZE]; struct libnet_ifaddr_list *address_list, *al; uint32_t addr; @@ -359,7 +358,7 @@ libnet_select_device(libnet_t *l) /* * Number of interfaces. */ - c = libnet_ifaddrlist(&address_list, l->device, err_buf); + c = libnet_ifaddrlist(&address_list, l->device, l->err_buf); if (c < 0) { /* err msg set in libnet_ifaddrlist() */ |