Skip to content

Commit

Permalink
Fix double free
Browse files Browse the repository at this point in the history
  • Loading branch information
astronautlevel2 committed Jun 12, 2020
1 parent b75d1ac commit 2c2c7f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ void update_qr(qr_data *data)
{
throw_error("File downloaded isn't a zip.", ERROR_LEVEL_WARNING);
}
free(zip_buf);
}
else
{
throw_error("Download failed.", ERROR_LEVEL_WARNING);
}

free(filename);
free(zip_buf);
}
}

Expand Down
2 changes: 2 additions & 0 deletions source/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 2c2c7f4

Please sign in to comment.