13
0

Clean up possibly-null pointer dereference (#4812).

git-svn-id: svn://localhost/ardour2/branches/3.0@11813 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-04-07 02:08:18 +00:00
parent bf2281d366
commit d23a97a6ac

View File

@ -187,17 +187,16 @@ std::string Mootcher::doRequest(std::string uri, std::string params)
return ""; return "";
} }
result = xml_page.memory;
// free the memory // free the memory
if(xml_page.memory){ if (xml_page.memory) {
free( xml_page.memory ); result = xml_page.memory;
xml_page.memory = NULL;
xml_page.size = 0;
} }
free (xml_page.memory);
xml_page.memory = NULL;
xml_page.size = 0;
//printf("freesound result: %s\n", result.c_str());
return result; return result;
} }