]> sigrok.org Git - libsigrok.git/blobdiff - output/float.c
Return SR_ERR_MALLOC upon allocation errors.
[libsigrok.git] / output / float.c
index cd4ef8c36f0cddff67af7ce13708de9d662c0a5d..7812413d7c7508ad4253172d1f85413d1e0646eb 100644 (file)
@@ -43,8 +43,10 @@ static int init(struct sr_output *o)
        if (!o->sdi->driver)
                return SR_ERR_ARG;
 
-       if (!(ctx = g_try_malloc0(sizeof(struct context))))
+       if (!(ctx = g_try_malloc0(sizeof(struct context)))) {
+               sr_err("output/float: Context malloc failed.");
                return SR_ERR_MALLOC;
+       }
 
        o->internal = ctx;