shared: Fix incorrect check of deserialize's return
shared: Fix incorrect check of deserialize's return

The deserialization function returns the number of items it added to
the list array it was passed. Store that value for looping through
freeing the result and verify serialization didn't have an error
before continuing.

Signed-off-by: William Douglas <07dd1d6cf12120bb0585d2eb50da402be35d56e5@intel.com>

sofar/buxton,sofar/buxton