Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: [nick-nhusb] src/sys



On 12/03/14 23:18, Nick Hudson wrote:
Log Message:
Replace malloc(9) with kmem(9)

In file sys/dev/usb/uaudio.c, size of memory to be freed
should be like this as far as i see above line, or it would panic.

Index: src/sys/dev/usb/uaudio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.140.2.4
diff -u -p -r1.140.2.4 uaudio.c
--- src/sys/dev/usb/uaudio.c	3 Dec 2014 14:18:07 -0000	1.140.2.4
+++ src/sys/dev/usb/uaudio.c	7 Dec 2014 14:23:32 -0000
@@ -1540,8 +1541,7 @@ uaudio_add_alt(struct uaudio_softc *sc,
 	/* Copy old data, if there was any */
 	if (sc->sc_nalts != 0) {
 		memcpy(nai, sc->sc_alts, sizeof(*ai) * (sc->sc_nalts));
-		kmem_free(sc->sc_alts,
-		    sizeof(struct audio_format) * sc->sc_nalts);
+		kmem_free(sc->sc_alts, sizeof(struct as_info) * sc->sc_nalts);
 	}
 	sc->sc_alts = nai;
 	DPRINTFN(2,"adding alt=%d, enc=%d\n",


--
t-hash


Home | Main Index | Thread Index | Old Index