diff --git a/debian/changelog b/debian/changelog index ec88404..837639f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ applauncherd (0.28.0) unstable; urgency=low - * + * Changes: Some coverity tool defects are fixed -- Olli Leppanen Thu, 14 Apr 2011 13:49:24 +0300 diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index df49f05..1ca997b 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -103,6 +103,7 @@ static int invokeLauncherLib(int argc, char ** argv) if ((error = dlerror()) != NULL) { fprintf(stderr, "%s\n", error); + dlclose(handle); return 0; } diff --git a/src/launcherlib/connection.cpp b/src/launcherlib/connection.cpp index 65012ed..7f8d65e 100644 --- a/src/launcherlib/connection.cpp +++ b/src/launcherlib/connection.cpp @@ -43,7 +43,14 @@ Connection::Connection(int socketFd, bool testMode) : m_argv(NULL), m_priority(0), m_delay(0), - m_sendPid(false) + m_sendPid(false), + +#if defined (HAVE_CREDS) + m_credsValue(0), + m_credsType(0), +#endif + m_gid(0), + m_uid(0) { m_io[0] = -1; m_io[1] = -1; @@ -248,7 +255,7 @@ uint32_t Connection::receiveMagic() if ((magic & INVOKER_MSG_MASK) == INVOKER_MSG_MAGIC) { - if (!(magic & INVOKER_MSG_MAGIC_VERSION_MASK) == INVOKER_MSG_MAGIC_VERSION) + if (!((magic & INVOKER_MSG_MAGIC_VERSION_MASK) == INVOKER_MSG_MAGIC_VERSION)) { Logger::logError("Connection: receiving bad magic version (%08x)\n", magic); return -1; diff --git a/src/launcherlib/connection.h b/src/launcherlib/connection.h index d5895bb..7e442d5 100644 --- a/src/launcherlib/connection.h +++ b/src/launcherlib/connection.h @@ -164,8 +164,6 @@ private: uint32_t m_priority; uint32_t m_delay; bool m_sendPid; - gid_t m_gid; - uid_t m_uid; #if defined (HAVE_CREDS) static const char * m_credsStr; @@ -173,6 +171,10 @@ private: creds_type_t m_credsType; #endif + gid_t m_gid; + uid_t m_uid; + + #ifdef UNIT_TEST friend class Ut_Connection; #endif