synthetic: fix a memory leak in case of snprintf error

Found by Coverity Scan.