[xiph-cvs] cvs commit: ao/src ao_wav.c

Michael Smith msmith at xiph.org
Fri Mar 16 23:44:18 PST 2001



msmith      01/03/16 23:44:17

  Modified:    src      ao_wav.c
  Log:
  Patches from Stan Seibert for memleaks and for decode on big-endian machines.

Revision  Changes    Path
1.8       +4 -1      ao/src/ao_wav.c

Index: ao_wav.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/ao_wav.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ao_wav.c	2001/02/28 07:50:11	1.7
+++ ao_wav.c	2001/03/17 07:44:17	1.8
@@ -221,7 +221,7 @@
 
                 /* Swap the bytes into the swap buffer (so we don't
                  mess up the output_samples buffer) */
-		for(i = 0; i < num_bytes/2; i+=2) {
+		for(i = 0; i < num_bytes; i+=2) {
                         s->swap_buffer[i]   = ((char *) output_samples)[i+1];
                         s->swap_buffer[i+1] = ((char *) output_samples)[i];
                 }
@@ -297,6 +297,9 @@
 
 ERR:
         close(s->fd);
+	free(s->output_file);
+	if (s->byte_swap)
+		free(s->swap_buffer);
         free(s);
 }
 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list