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

@@ -48,7 +48,7 @@ SR_PRIV int std_hw_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
return SR_ERR_ARG;
}
if (!(drvc = malloc(sizeof(struct drv_context)))) {
if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) {
sr_err("%sDriver context malloc failed.", prefix);
return SR_ERR_MALLOC;
}