If you enable libsysfs2hpi plugin in the conf file, run openhpid and stop it with no i2c devices, the following happens:
sysfs: CRIT: sysfs2hpi.c:572: no i2c devices found [...] *** Error in `/tmp/sbin/openhpid': double free or corruption (out): 0x00007ffff0024440 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x77e35)[0x7ffff624ae35] /lib64/libc.so.6(+0x8051a)[0x7ffff625351a] /lib64/libc.so.6(cfree+0x4c)[0x7ffff6256ccc] /tmp/lib/openhpi/libsysfs2hpi.so(oh_close+0x19)[0x7ffff5b76ad9] /tmp/sbin/openhpid(oh_close_handlers+0x45)[0x4134b5] /tmp/sbin/openhpid(oh_finit+0xe)[0x41281e] /tmp/sbin/openhpid(main+0x3ea)[0x407aaa] /lib64/libc.so.6(__libc_start_main+0xf0)[0x7ffff61f3580] /tmp/sbin/openhpid(_start+0x29)[0x407c19]
the attached patch fix the issue.
Any comments on this?
Patch looks good for me.
Fixed with checkin #7666