diff src/nas.c @ 3462:6c7605dfcf07

[xemacs-hg @ 2006-06-19 18:19:33 by james] Fix various problems found by static checkers: use of uninitialized values, dereferencing pointers before checking whether they are NULL, memory leaks, and incomplete checking of return values. <m3k67gpyhk.fsf@jerrypc.cs.usu.edu>
author james
date Mon, 19 Jun 2006 18:19:38 +0000
parents ecf1ebac70d8
children c12b646d84ee
line wrap: on
line diff
--- a/src/nas.c	Mon Jun 19 18:10:19 2006 +0000
+++ b/src/nas.c	Mon Jun 19 18:19:38 2006 +0000
@@ -728,7 +728,7 @@
 /* Stuff taken from wave.c from NAS.  Just like snd files, NAS can't
    read wave data from memory, so these functions do that for us. */
 
-#define Err()		{ return NULL; }
+#define Err()		{ free(wi); return NULL; }
 #define readFourcc(_f)	dread(_f, sizeof(RIFF_FOURCC), 1)
 #define cmpID(_x, _y)							      \
     strncmp((CBinbyte *) (_x), (CBinbyte *) (_y), sizeof(RIFF_FOURCC))