Merge pull request #2052 from maciejmrowiec/3.6.x

Fix handling ports listening monitoring variable.
Initialize buffer before passing into sscanf. If sscanf don't match the pattern then
uninitialzed buffer is passed forward into an rlist.

Redmine: #6859
(cherry picked from commit 7db296ba95ce1d0c49a60c6e33a2830429dc23db)