2
0
forked from Ivasoft/DSView

Replace g_try_malloc to malloc

This commit is contained in:
dreamsourcelabTAI
2023-06-06 15:34:30 +08:00
parent eb783ca690
commit 770c4ceb61
31 changed files with 413 additions and 266 deletions

View File

@@ -56,10 +56,11 @@ SR_PRIV int ds_trigger_init(void)
int i, j;
if (!trigger) {
if (!(trigger = g_try_malloc0(sizeof(struct ds_trigger)))) {
if (!(trigger = malloc(sizeof(struct ds_trigger)))) {
sr_err("Trigger malloc failed.");
return SR_ERR_MALLOC;
}
memset(trigger, 0, sizeof(struct ds_trigger));
}
trigger->trigger_en = 0;