Fix memory leaks in libsyndicate