Ticket #4722: dynlib-file-handle-leak-in-filtermanager.2.patch

File dynlib-file-handle-leak-in-filtermanager.2.patch, 822 bytes (added by Erik Hovland <erik@…>, 13 years ago)

The previous svn commit missed one of the dlclose() calls

  • libs/libmythtv/filtermanager.cpp

    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 |    1 +
     1 files changed, 1 insertions(+), 0 deletions(-)
    
    diff --git a/libs/libmythtv/filtermanager.cpp b/libs/libmythtv/filtermanager.cpp
    index 11f1b6d..e92a6a2 100644
    a b VideoFilter * FilterManager::LoadFilter(FilterInfo *FiltInfo, 
    464464
    465465    if (!InitFilter)
    466466    {
     467        dlclose(handle);
    467468        VERBOSE(VB_IMPORTANT, QString("FilterManager: unable to load symbol "
    468469                "'%1' from shared library '%2', dlopen reports error '%3'")
    469470                .arg(FiltInfo->symbol)