Fixed a few minor memory leaks

Signed-off-by: sebhz <seb@zyglute.fr>