]> code.delx.au - pulseaudio/blobdiff - src/modules/module-oss.c
fix a couple of issues I found when compiling polypaudio with gcc 2.95
[pulseaudio] / src / modules / module-oss.c
index d9980d82da158091288dce58a46645494581d324..ccc3c7d9807a1c0cbc30e6a62c46b167b5fd8aa7 100644 (file)
@@ -461,8 +461,9 @@ int pa__init(pa_core *c, pa_module*m) {
      * Without this snippet, poll will never register the fd as ready.
      */
     if (u->source) {
-        char buf[u->sample_size];
+        char *buf = pa_xnew(char, u->sample_size);
         read(u->fd, buf, u->sample_size);
+        pa_xfree(buf);
     }
 
     /* Read mixer settings */