Hopefully fix crash when using SHM buffers - we should release them too. WIP

Signed-off-by: Carsten Munk <carsten.munk@jollamobile.com>