From 0956676eb1c59a6228ac13b05326cd513f687a77 Mon Sep 17 00:00:00 2001 From: evpobr Date: Wed, 1 Sep 2021 10:01:43 +0500 Subject: [PATCH] sfprocess: Fix memory leaks --- examples/sfprocess.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/sfprocess.c b/examples/sfprocess.c index 2a98d2fa..ce1bda8a 100644 --- a/examples/sfprocess.c +++ b/examples/sfprocess.c @@ -98,12 +98,14 @@ main (void) if (sfinfo.channels > MAX_CHANNELS) { printf ("Not able to process more than %d channels\n", MAX_CHANNELS) ; + sf_close (infile) ; return 1 ; } ; /* Open the output file. */ if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo))) { printf ("Not able to open output file %s.\n", outfilename) ; puts (sf_strerror (NULL)) ; + sf_close (infile) ; return 1 ; } ;