Commit 9fa1e98d authored by Ander Conselvan de Oliveira's avatar Ander Conselvan de Oliveira Committed by Ulrich Sibiller

om: Fix memory leak on read_EncodingInfo error path.

parent 748cf894
......@@ -1910,8 +1910,10 @@ read_EncodingInfo(
} else
len = strlen(buf);
font_data->name = (char *) Xmalloc(len + 1);
if (font_data->name == NULL)
if (font_data->name == NULL) {
Xfree(font_data);
return NULL;
}
strncpy(font_data->name, buf,len);
font_data->name[len] = 0;
if (bufptr && _XlcCompareISOLatin1(bufptr, "GL") == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment