Fix double free

This commit is contained in:
2020-06-11 21:24:01 -04:00
parent b75d1acb21
commit 2c2c7f4b33
2 changed files with 3 additions and 1 deletions

View File

@@ -292,6 +292,7 @@ void update_qr(qr_data *data)
{
throw_error("File downloaded isn't a zip.", ERROR_LEVEL_WARNING);
}
free(zip_buf);
}
else
{
@@ -299,7 +300,6 @@ void update_qr(qr_data *data)
}
free(filename);
free(zip_buf);
}
}

View File

@@ -807,7 +807,9 @@ u32 http_get(const char *url, char ** filename, char ** buf, InstallType install
return 0;
}
DEBUG(content_disposition);
char * tok = strtok(content_disposition, "\"");
DEBUG(tok);
tok = strtok(NULL, "\"");
if(!(tok))