Skip to contentSkip to conversation

ALSA: usb-audio - NULL dereference on probe error

PATCH In review Dan Carpenter 2 participants 2 messages Sep 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio - NULL dereference on probe error

There was a potential NULL dereference introduced in 362e4e49abe "ALSA: usb-audio - clear chip->probing on error exit"

sound/usb/card.c +2 -1
index cc08588..8db260f 100644
@@ -532,7 +532,8 @@ snd_usb_audio_probe(struct usb_device *dev,
  __error:
 	if (chip && !chip->num_interfaces)
 		snd_card_free(chip->card);
-	chip->probing = 0;
+	if (chip)
+		chip->probing = 0;
 	mutex_unlock(&register_mutex);
  __err_val:
 	return NULL;
#1 lore raw

At Tue, 27 Sep 2011 10:44:07 +0300,

Quoted 5 lines · Dan Carpenter

There was a potential NULL dereference introduced in 362e4e49abe "ALSA: usb-audio - clear chip->probing on error exit"

Thanks. It's already fixed in the commit
61a6a108d15213f5ee06332e1e7766d3860e4453.

Takashi