Fix memory leaks in test case.
Fix memory leaks in test case.

hillu/yara,VirusTotal/yara,hillu/yara,VirusTotal/yara,wxsBSD/yara,VirusTotal/yara,pombredanne/yara,wxsBSD/yara,pombredanne/yara,wxsBSD/yara,wxsBSD/yara,hillu/yara,hillu/yara,VirusTotal/yara,VirusTotal/yara,hillu/yara,pombredanne/yara,pombredanne/yara,pombredanne/yara,wxsBSD/yara