mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Fix coverity reported memory leaks
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
63795a84f4
commit
48c2929f48
1 changed files with 4 additions and 1 deletions
|
@ -104,8 +104,10 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
|
|||
* Get the i'th dive in XML format so we can process it.
|
||||
* We need to save to a file before we can reload it back into memory...
|
||||
*/
|
||||
if (selected && !dive->selected)
|
||||
if (selected && !dive->selected) {
|
||||
free_xml_params(params);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* make sure the buffer is empty and add the dive */
|
||||
mb.len = 0;
|
||||
|
@ -151,6 +153,7 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
|
|||
zip_close(zip);
|
||||
QFile::remove(tempfile);
|
||||
xsltFreeStylesheet(xslt);
|
||||
free_xml_params(params);
|
||||
return false;
|
||||
}
|
||||
free_buffer(&mb);
|
||||
|
|
Loading…
Reference in a new issue