Fixed memory leak
This commit is contained in:
parent
66d69eab6b
commit
a457db4447
@ -208,7 +208,7 @@ void readOneWireSensors()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
char buf[sizeof(ds18b20Address) * 2];
|
char buf[(sizeof(ds18b20Address) * 2)+1]; /* additional byte for trailing terminator */
|
||||||
snprintf(buf, sizeof(buf), "%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",
|
snprintf(buf, sizeof(buf), "%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",
|
||||||
ds18b20Address[0],
|
ds18b20Address[0],
|
||||||
ds18b20Address[1],
|
ds18b20Address[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user