X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=std.c;h=8add0d3dc622c2045cfa5c870efb4ab39183dde7;hb=c2523f221364c0df51b8093693a246a713633912;hp=03e9db4f9f4a8dccf85445dbd6bcd6fc46dc415d;hpb=17f63de642c3cb613f91eabd2e19ebed6785f755;p=libsigrok.git diff --git a/std.c b/std.c index 03e9db4f..8add0d3d 100644 --- a/std.c +++ b/std.c @@ -47,12 +47,13 @@ SR_PRIV int std_hw_init(struct sr_context *sr_ctx, struct sr_dev_driver *di, return SR_ERR_ARG; } - if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) { + if (!(drvc = g_try_malloc(sizeof(struct drv_context)))) { sr_err("%sDriver context malloc failed.", prefix); return SR_ERR_MALLOC; } drvc->sr_ctx = sr_ctx; + drvc->instances = NULL; di->priv = drvc; return SR_OK;