Browse Source

Bugfix: Free filename entry for writing config file when done with it

nfactor-troky
Luke Dashjr 12 years ago
parent
commit
1a8fe32e4c
  1. 3
      cgminer.c

3
cgminer.c

@ -2605,6 +2605,7 @@ retry: @@ -2605,6 +2605,7 @@ retry:
struct stat statbuf;
strcpy(filename, str);
free(str);
if (!stat(filename, &statbuf)) {
wlogprint("File exists, overwrite?\n");
input = getch();
@ -2612,6 +2613,8 @@ retry: @@ -2612,6 +2613,8 @@ retry:
goto retry;
}
}
else
free(str);
fcfg = fopen(filename, "w");
if (!fcfg) {
wlogprint("Cannot open or create file\n");

Loading…
Cancel
Save