forked from Ivasoft/DSView
replace malloc with g_malloc
This commit is contained in:
@@ -57,7 +57,7 @@ static int init(struct sr_input *in, const char *filename)
|
||||
|
||||
(void)filename;
|
||||
|
||||
if (!(ctx = malloc(sizeof(struct context)))) {
|
||||
if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
|
||||
sr_err("Input format context malloc failed.");
|
||||
return SR_ERR_MALLOC;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user