mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2024-12-22 04:20:17 +02:00
EC/BN memleak
This commit is contained in:
parent
bf40bb6402
commit
5ba2dbddd4
10
src/cli.cpp
10
src/cli.cpp
@ -22,6 +22,15 @@
|
|||||||
|
|
||||||
#include "cli.h"
|
#include "cli.h"
|
||||||
|
|
||||||
|
CLI::~CLI()
|
||||||
|
{
|
||||||
|
EC_GROUP_free(eCurve);
|
||||||
|
EC_POINT_free(genPoint);
|
||||||
|
EC_POINT_free(pubPoint);
|
||||||
|
BN_free(privateKey);
|
||||||
|
BN_free(genOrder);
|
||||||
|
}
|
||||||
|
|
||||||
bool CLI::loadJSON(const fs::path& filename, json *output) {
|
bool CLI::loadJSON(const fs::path& filename, json *output) {
|
||||||
if (!filename.empty() && !fs::exists(filename)) {
|
if (!filename.empty() && !fs::exists(filename)) {
|
||||||
fmt::print("ERROR: File {} does not exist\n", filename.string());
|
fmt::print("ERROR: File {} does not exist\n", filename.string());
|
||||||
@ -417,6 +426,7 @@ int CLI::BINK1998Generate() {
|
|||||||
|
|
||||||
sscanf(cRaw, "%d", &oRaw);
|
sscanf(cRaw, "%d", &oRaw);
|
||||||
nRaw += (oRaw % 999999); // ensure our serial is less than 999999
|
nRaw += (oRaw % 999999); // ensure our serial is less than 999999
|
||||||
|
BN_free(bnrand);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->options.verbose) {
|
if (this->options.verbose) {
|
||||||
|
@ -85,6 +85,7 @@ class CLI {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CLI(Options options, json keys);
|
CLI(Options options, json keys);
|
||||||
|
~CLI();
|
||||||
|
|
||||||
static bool loadJSON(const fs::path& filename, json *output);
|
static bool loadJSON(const fs::path& filename, json *output);
|
||||||
static void showHelp(char *argv[]);
|
static void showHelp(char *argv[]);
|
||||||
|
Loading…
Reference in New Issue
Block a user