Commit 535123c9 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wpcap: Use the strdup function instead of reimplementing it.

parent 6b7689cb
......@@ -859,7 +859,7 @@ char * CDECL pcap_lookupdev( char *errbuf )
if (!ret)
{
if (pcap_findalldevs( &devs, errbuf ) == PCAP_ERROR || !devs) return NULL;
if ((ret = malloc( strlen(devs->name) + 1 ))) strcpy( ret, devs->name );
ret = strdup( devs->name );
pcap_freealldevs( devs );
}
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment