Dont call ac97_release_codec with NULL argument in
PATCH 1/1 Dont call ac97_release_codec with NULL argument in
hi,
this is a fix for coverity id #243. We only jump to err_codec if ac97_alloc_codec() fails its malloc() in which case codec is NULL. Since ac97_release_codec dereferences its argument we shouldnt call it with a NULL argument.
Signed-off-by Eric Sesterhenn <[email protected]>
sound/oss/es1371.c renamed from sound/oss/es1371.c.orig +1 -1
@@ -3040,8 +3040,8 @@ static int __devinit es1371_probe(struct err_irq:release_region (s->io,ES1371_EXTENT ); err_region: - err_codec:ac97_release_codec (s->codec); + err_codec:kfree (s);return res; }