Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f31158c9 authored by Diego Calleja's avatar Diego Calleja Committed by Greg Kroah-Hartman
Browse files

Staging: Fix leak in drivers/staging/at76_usb.c

parent 19cbd3d7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2319,9 +2319,11 @@ static int at76_iw_handler_get_scan(struct net_device *netdev,
	if (!iwe)
		return -ENOMEM;

	if (priv->scan_state != SCAN_COMPLETED)
	if (priv->scan_state != SCAN_COMPLETED) {
		/* scan not yet finished */
		kfree(iwe);
		return -EAGAIN;
	}

	spin_lock_irqsave(&priv->bss_list_spinlock, flags);