Skip to content

Commit

Permalink
Properly set l->err_buf if libnet_ifaddrlist() fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHabets committed Nov 16, 2012
1 parent 70a3af4 commit 2e724b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libnet/src/libnet_if_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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() */
Expand Down

0 comments on commit 2e724b2

Please sign in to comment.