aregm / nff-go

NFF-Go -Network Function Framework for GO (former YANFF)
BSD 3-Clause "New" or "Revised" License
1.38k stars 156 forks source link

Fix nil pointer refering initializing OS devices #670

Closed hanlins closed 4 years ago

hanlins commented 4 years ago

If OS device is not initialized, then current code will panic since it will cast nil into int. Fix the nil pointer referencing and only perform casting when the device is already initialized.