Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv30937/core

Modified Files:
        pcm.c 
Log Message:
don't call kfree with NULL pointer (constraint rules is not always allocated).



Index: pcm.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- pcm.c       30 May 2003 12:28:33 -0000      1.31
+++ pcm.c       17 Oct 2003 15:38:59 -0000      1.32
@@ -819,7 +819,8 @@
                runtime->private_free(runtime);
        snd_free_pages((void*)runtime->status, 
PAGE_ALIGN(sizeof(snd_pcm_mmap_status_t)));
        snd_free_pages((void*)runtime->control, 
PAGE_ALIGN(sizeof(snd_pcm_mmap_control_t)));
-       kfree(runtime->hw_constraints.rules);
+       if (runtime->hw_constraints.rules)
+               kfree(runtime->hw_constraints.rules);
        kfree(runtime);
        substream->runtime = NULL;
        substream->pstr->substream_opened--;



-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to