mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 04:24:19 +00:00
intensity: prevent double free on change from (t)ui
This commit is contained in:
parent
7f7557b59b
commit
d6e6f10881
@ -2193,9 +2193,8 @@ void api_pool_profile(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char
|
|||||||
|
|
||||||
void update_config_intensity(struct profile *profile)
|
void update_config_intensity(struct profile *profile)
|
||||||
{
|
{
|
||||||
|
char buf[256] = { 0 };
|
||||||
int i;
|
int i;
|
||||||
char buf[255];
|
|
||||||
memset(buf, 0, 255);
|
|
||||||
|
|
||||||
for (i = 0; i<nDevs; ++i) {
|
for (i = 0; i<nDevs; ++i) {
|
||||||
if (gpus[i].dynamic) {
|
if (gpus[i].dynamic) {
|
||||||
@ -2206,7 +2205,7 @@ void update_config_intensity(struct profile *profile)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profile->intensity) {
|
if (profile->intensity && profile->intensity != default_profile.intensity) {
|
||||||
free(profile->intensity);
|
free(profile->intensity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user