added check for sal_free