shithub: opusfile

Download patch

ref: 218518dcbd25df4dd97445431ec84ccc7606e952
parent: 3cc27477538da445397eada4f609992165f4906b
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Tue Feb 12 02:50:07 EST 2013

Add va_end() invocations.

Fixes Coverity #980717, #980718, #980719.

--- a/src/http.c
+++ b/src/http.c
@@ -3071,7 +3071,10 @@
 
 void *op_url_stream_create(OpusFileCallbacks *_cb,
  const char *_url,...){
-  va_list ap;
+  va_list  ap;
+  void    *ret;
   va_start(ap,_url);
-  return op_url_stream_vcreate(_cb,_url,ap);
+  ret=op_url_stream_vcreate(_cb,_url,ap);
+  va_end(ap);
+  return ret;
 }
--- a/src/opusfile.c
+++ b/src/opusfile.c
@@ -1617,9 +1617,12 @@
 }
 
 OggOpusFile *op_open_url(const char *_url,int *_error,...){
-  va_list ap;
+  OggOpusFile *ret;
+  va_list      ap;
   va_start(ap,_error);
-  return op_vopen_url(_url,_error,ap);
+  ret=op_vopen_url(_url,_error,ap);
+  va_end(ap);
+  return ret;
 }
 
 /*Convenience routine to clean up from failure for the open functions that
@@ -1655,9 +1658,12 @@
 }
 
 OggOpusFile *op_test_url(const char *_url,int *_error,...){
-  va_list ap;
+  OggOpusFile *ret;
+  va_list      ap;
   va_start(ap,_error);
-  return op_vtest_url(_url,_error,ap);
+  ret=op_vtest_url(_url,_error,ap);
+  va_end(ap);
+  return ret;
 }
 
 int op_test_open(OggOpusFile *_of){