# HG changeset patch # User mas01cr # Date 1250267972 0 # Node ID 82d23418d86711c17654b24fe8abd61913165abd # Parent 337e5962218a37dadfd8dd2c18542a08fae5f242 Fix some fd leaks in the command-line binary Strictly speaking, they're not really leaks, because the only codepath that suffers from these leaks exits immediately afterwards. On the other hand, this fix makes valgrind on e.g. tests/0025 happier, going from 5 errors to none. diff -r 337e5962218a -r 82d23418d867 audioDB.cpp --- a/audioDB.cpp Thu Aug 13 11:20:56 2009 +0000 +++ b/audioDB.cpp Fri Aug 14 16:39:32 2009 +0000 @@ -149,8 +149,18 @@ delete reporter; if(rng) gsl_rng_free(rng); - if(infid>0) + if(infid>0) { close(infid); + infid = 0; + } + if(powerfd) { + close(powerfd); + powerfd = 0; + } + if(timesFile) { + delete timesFile; + timesFile = 0; + } if(adb) { audiodb_close(adb); adb = NULL;