2
0
forked from Ivasoft/DSView

replace malloc with g_malloc

This commit is contained in:
dreamsource-tai
2024-07-25 10:53:30 +08:00
parent 66ed68ea17
commit c50e8f714a
31 changed files with 116 additions and 122 deletions

View File

@@ -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;
}