ri_t is a complex structure.
It should be freed by call iri_destroy.
Cast it to a scopedPtr is forbiden because that call a delete function not iri_destroy
+* Tue Jul 09 2013 Baptiste DURAND <baptiste.durand@eurogiciel.fr> accepted/tizen/20130708.234009@378666e
+- Fix memory leak
+
* Mon Jul 08 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130627.212436@1351791
- Refactor spec handling of decrypt support
- Return an error when we try to load an encrypted ressource if DECRYPT build Option is disabled.
return true;
}
- DPL::ScopedPtr<iri_t> iri(iri_parse(url));
+ iri_t* iri = iri_parse(url);
+ if (!iri)
+ return false;
+
if (!iri->scheme || !iri->host || strlen(iri->host) == 0) {
+ iri_destroy(iri);
return true;
}
+
std::string scheme = iri->scheme;
std::string host = iri->host;
+ iri_destroy(iri);
if (scheme.find(SCHEME_TYPE_HTTP) == std::string::npos) {
LogDebug("url doesn't need to check white list");