seems to be that in src/output-jack.c:output_new_jack() we call 
jack_client_open on our output_jack *a and then bail if it fails in goto out;
this then calls jack_ringbuffer_free on a->ringbuf if its not null, but ringbuf 
isnt null, if we force a->ringbuf=NULL (as it indeed is) on the new 'a' object 
before attempting jack_client_open then we can gaurantee it wont be accidently 
jack_ringbuffer_free's before we've jack_ringbuffer_create'd it


      
diff -ruN potamus-0.10/src/output-jack.c potamus-0.10.new/src/output-jack.c
--- potamus-0.10/src/output-jack.c	2008-06-12 18:36:14.000000000 +0100
+++ potamus-0.10.new/src/output-jack.c	2010-02-12 11:45:46.000000000 +0000
@@ -142,6 +142,7 @@
 	o->release = oj_release;
 	o->close = oj_close;
 
+	a->ringbuf=NULL;
 	a->client = jack_client_open("potamus", JackNoStartServer, NULL);
 	if (a->client == NULL)
 		goto out;

Reply via email to