liske / needrestart

Restart daemons after library updates.
GNU General Public License v2.0
426 stars 67 forks source link

[uCode] fix uninitialized value in logging of processor index #273

Closed stbuehler closed 1 year ago

stbuehler commented 1 year ago

This got broken in f8c2609f8d5a0e10bd988497b8ea9815a7bb2fa8.

Before that it would have effectively logged $processors{$pid}->{processor}, but the processor entry is also the key in %processors, i.e. equals $pid.

stbuehler commented 1 year ago

See #249 for example output of this bug (not the actual problem in #249, but not helping adding further errors to the log):

Use of uninitialized value $processor in concatenation (.) or string at /usr/share/perl5/vendor_perl/NeedRestart/uCode.pm line 61.
[ucode] # did not get available microcode version
liske commented 1 year ago

Thanks for catching this!