When LoadFilter fails to load a symbol from the dynamically loaded shared library
From: Erik Hovland <erik@hovland.org>
it should close the shared library. Otherwise it will be a file handle leak.
---
libs/libmythtv/filtermanager.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libs/libmythtv/filtermanager.cpp b/libs/libmythtv/filtermanager.cpp
index 55cc392..71c2dac 100644
a
|
b
|
VideoFilter * FilterManager::LoadFilter(FilterInfo *FiltInfo, |
464 | 464 | |
465 | 465 | if (!InitFilter) |
466 | 466 | { |
| 467 | dlclose(handle); |
467 | 468 | VERBOSE(VB_IMPORTANT, QString("FilterManager: unable to load symbol " |
468 | 469 | "'%1' from shared library '%2', dlopen reports error '%3'") |
469 | 470 | .arg(FiltInfo->symbol) |
… |
… |
VideoFilter * FilterManager::LoadFilter(FilterInfo *FiltInfo, |
476 | 477 | |
477 | 478 | if (Filter == NULL) |
478 | 479 | { |
| 480 | dlclose(handle); |
479 | 481 | return NULL; |
480 | 482 | } |
481 | 483 | |