Fix potential memleaks in linuxraw.