From 80eff0b3347ec80f77313bc6ef36c10c0536a91d Mon Sep 17 00:00:00 2001 From: sletz Date: Fri, 29 Oct 2010 08:25:09 +0000 Subject: [PATCH] Correct lsp.c code. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4070 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 4 ++++ example-clients/lsp.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 92daeffb..fefd763d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,10 @@ David Garcia Garzon Jackdmp changes log --------------------------- +2010-10-29 Stephane Letz + + * Correct lsp.c code. + 2010-09-08 Stephane Letz * Sync JackAlsaDriver::alsa_driver_check_card_type with JACK1 backend. diff --git a/example-clients/lsp.c b/example-clients/lsp.c index 5a3362f2..da25643e 100644 --- a/example-clients/lsp.c +++ b/example-clients/lsp.c @@ -146,7 +146,7 @@ main (int argc, char *argv[]) if (!ports) goto error; - for (i = 0; ports[i]; ++i) { + for (i = 0; ports && ports[i]; ++i) { // skip over any that don't match ALL of the strings presented at command line skip_port = 0; for(k = optind; k < argc; k++){ @@ -227,6 +227,8 @@ main (int argc, char *argv[]) } error: + if (ports) + jack_free (ports); jack_client_close (client); exit (0); }