Browse Source

Avoid double free on I/O buffer when rtl_transmit() returns failure.

Convert printf() to DBG(); printf() is not allowed in drivers.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
e436b993a9
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/drivers/net/rtl8139.c

+ 1
- 2
src/drivers/net/rtl8139.c View File

@@ -380,8 +380,7 @@ static int rtl_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) {
380 380
 
381 381
 	/* Check for space in TX ring */
382 382
 	if ( rtl->tx.iobuf[rtl->tx.next] != NULL ) {
383
-		printf ( "TX overflow\n" );
384
-		free_iob ( iobuf );
383
+		DBG ( "TX overflow\n" );
385 384
 		return -ENOBUFS;
386 385
 	}
387 386
 

Loading…
Cancel
Save