comparison audioDB.cpp @ 601:82d23418d867

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.
author mas01cr
date Fri, 14 Aug 2009 16:39:32 +0000
parents a3d62f2f864f
children 2a97f3f9a6ac
comparison
equal deleted inserted replaced
600:337e5962218a 601:82d23418d867
147 munmap(powerFileNameTable, fileTableLength); 147 munmap(powerFileNameTable, fileTableLength);
148 if(reporter) 148 if(reporter)
149 delete reporter; 149 delete reporter;
150 if(rng) 150 if(rng)
151 gsl_rng_free(rng); 151 gsl_rng_free(rng);
152 if(infid>0) 152 if(infid>0) {
153 close(infid); 153 close(infid);
154 infid = 0;
155 }
156 if(powerfd) {
157 close(powerfd);
158 powerfd = 0;
159 }
160 if(timesFile) {
161 delete timesFile;
162 timesFile = 0;
163 }
154 if(adb) { 164 if(adb) {
155 audiodb_close(adb); 165 audiodb_close(adb);
156 adb = NULL; 166 adb = NULL;
157 } 167 }
158 if(lsh) 168 if(lsh)