1
0
Fork 0

Drivers: hv: Fix a memory leak

There was a memory leak in a failure path in vmbus_process_offer().
Fix it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hifive-unleashed-5.1
K. Y. Srinivasan 2011-12-12 09:29:16 -08:00 committed by Greg Kroah-Hartman
parent 2eb7f204db
commit 8b8ee67531
1 changed files with 1 additions and 0 deletions

View File

@ -287,6 +287,7 @@ static void vmbus_process_offer(struct work_struct *work)
spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
list_del(&newchannel->listentry);
spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
kfree(newchannel->device_obj);
free_channel(newchannel);
} else {