[xiph-cvs] cvs commit: ices/src stream.c
Brendan
brendan at xiph.org
Wed Mar 12 21:32:47 PST 2003
brendan 03/03/13 00:32:47
Modified: src stream.c
Log:
Gar, look out for double free
Revision Changes Path
1.49 +5 -2 ices/src/stream.c
Index: stream.c
===================================================================
RCS file: /cvs/ice/ices/src/stream.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- stream.c 13 Mar 2003 00:10:11 -0000 1.48
+++ stream.c 13 Mar 2003 05:32:47 -0000 1.49
@@ -180,6 +180,7 @@
#endif
#ifdef HAVE_LIBLAME
+ obuf.data = NULL;
obuf.len = 0;
if (config->reencode)
@@ -296,13 +297,15 @@
rc = shout_send (stream->conn, obuf.data, len);
}
- free(obuf.data);
+ if (obuf.data)
+ free(obuf.data);
#endif
return 0;
err:
#ifdef HAVE_LIBLAME
- free(obuf.data);
+ if (obuf.data)
+ free(obuf.data);
#endif
return -1;
}
<p><p>--- >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