mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-30 13:00:30 +00:00
sensors_parse_chip_name: Initialize path
sensors_parse_chip_name claims to overwrite all of result but path is
not set. This is generally not a problem when using statically allocated
data that is pre-zeroed but the parser uses dynamic allocation and the
chip name may contain garbage depending on the specific code flow
resulting from compiling the parser.
Setting the path was dropped when it was renamed from busname.
Fixes: 8896ba3b ("Rename sensors_chip_name.busname to path, as this is
what we are using it for by now.")
This commit is contained in:
1 parent
e0efe7dc76
commit
10c6068b3e
1 file changed
+1
@@ -84,6 +84,7 @@ int sensors_parse_chip_name(const char *name, sensors_chip_name *res)
|
||||
{
|
||||
char *dash;
|
||||
|
||||
memset(res, 0, sizeof(*res));
|
||||
/* First, the prefix. It's either "*" or a real chip name. */
|
||||
if (!strncmp(name, "*-", 2)) {
|
||||
res->prefix = SENSORS_CHIP_NAME_PREFIX_ANY;
|
||||
|
||||
Reference in new issue
Block a user