ac: fix a memory leak in the error path of ac_build_type_name_for_intr

This commit is contained in:
Marek Olšák 2019-07-24 17:36:25 -04:00
parent f6eca14f1b
commit efe2d8c5f9

View file

@ -351,6 +351,7 @@ void ac_build_type_name_for_intr(LLVMTypeRef type, char *buf, unsigned bufsize)
char *type_name = LLVMPrintTypeToString(type);
fprintf(stderr, "Error building type name for: %s\n",
type_name);
LLVMDisposeMessage(type_name);
return;
}
elem_type = LLVMGetElementType(type);