mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-07 11:42:15 +00:00
Bugfix: Free filename entry for writing config file when done with it
This commit is contained in:
parent
e0b0a6c030
commit
1a8fe32e4c
@ -2605,6 +2605,7 @@ retry:
|
|||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
strcpy(filename, str);
|
strcpy(filename, str);
|
||||||
|
free(str);
|
||||||
if (!stat(filename, &statbuf)) {
|
if (!stat(filename, &statbuf)) {
|
||||||
wlogprint("File exists, overwrite?\n");
|
wlogprint("File exists, overwrite?\n");
|
||||||
input = getch();
|
input = getch();
|
||||||
@ -2612,6 +2613,8 @@ retry:
|
|||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
free(str);
|
||||||
fcfg = fopen(filename, "w");
|
fcfg = fopen(filename, "w");
|
||||||
if (!fcfg) {
|
if (!fcfg) {
|
||||||
wlogprint("Cannot open or create file\n");
|
wlogprint("Cannot open or create file\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user