coll/sm: fix minor memory leak

this is a backport of commit 5d44a30111e730c1a6a9aef19548b87e704316de in master