WebDAV: fixed some memory issues
Found in nightly testing with Valgrind. One is a boolean check on an uninitialized variable which might have caused Basic authorization to be sent when not desired, the other a harmless end-of run leak.
This commit is contained in:
parent
d3e9177670
commit
9e776311a9
2 changed files with 6 additions and 3 deletions
|
@ -151,6 +151,7 @@ std::string Status2String(const ne_status *status)
|
|||
}
|
||||
|
||||
Session::Session(const boost::shared_ptr<Settings> &settings) :
|
||||
m_forceAuthorizationOnce(false),
|
||||
m_settings(settings),
|
||||
m_debugging(false),
|
||||
m_session(NULL),
|
||||
|
|
|
@ -223,7 +223,7 @@ public:
|
|||
* CLIENT_TEST_WEBDAV=<server> [caldav] [carddav] <prop>=<val> ...; ...
|
||||
*/
|
||||
static class WebDAVTestSingleton {
|
||||
list<WebDAVTest *> m_sources;
|
||||
list< boost::shared_ptr<WebDAVTest> > m_sources;
|
||||
|
||||
public:
|
||||
WebDAVTestSingleton()
|
||||
|
@ -258,10 +258,12 @@ public:
|
|||
}
|
||||
}
|
||||
if (caldav) {
|
||||
m_sources.push_back(new WebDAVTest(server, "caldav", props));
|
||||
boost::shared_ptr<WebDAVTest> ptr(new WebDAVTest(server, "caldav", props));
|
||||
m_sources.push_back(ptr);
|
||||
}
|
||||
if (carddav) {
|
||||
m_sources.push_back(new WebDAVTest(server, "carddav", props));
|
||||
boost::shared_ptr<WebDAVTest> ptr(new WebDAVTest(server, "carddav", props));
|
||||
m_sources.push_back(ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue