Ticket #10363: 0001-Coverity-CID-992486-Fixed-killing-random-thread.patch

File 0001-Coverity-CID-992486-Fixed-killing-random-thread.patch, 843 bytes (added by Mrowqa, 11 years ago)
  • src/apps/cdplayer/CDDBSupport.cpp

    From df0466e3deda5689bb8cd2f3337097e6d0fef230 Mon Sep 17 00:00:00 2001
    From: Mrowqa <artur.jamro@gmail.com>
    Date: Wed, 1 Jan 2014 23:53:52 +0100
    Subject: [PATCH] Coverity CID 992486: Fixed killing random thread
    
    ---
     src/apps/cdplayer/CDDBSupport.cpp | 7 +++++--
     1 file changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/src/apps/cdplayer/CDDBSupport.cpp b/src/apps/cdplayer/CDDBSupport.cpp
    index d108901..1e5c9e7 100644
    a b CDDBQuery::CDDBQuery(const char *server, int32 port)  
    459459    fServerName(server),
    460460    fPort(port),
    461461    fConnected(false),
    462     fState(kInitial)
     462    fThread(0),
     463    fState(kInitial),
     464    fResult(B_OK)
    463465{
    464466}
    465467
    466468
    467469CDDBQuery::~CDDBQuery()
    468470{
    469     kill_thread(fThread);
     471    if (fThread > 0)
     472        kill_thread(fThread);
    470473}
    471474
    472475