]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoder.c
srd: extra module path can now optionally be passed to srd_init()
[libsigrokdecode.git] / decoder.c
index 557aa71c8c39eede1b0cd28f3007687e96012289..841e4321180a45ff3d79b6c512bdc54eb81e8e3b 100644 (file)
--- a/decoder.c
+++ b/decoder.c
@@ -95,6 +95,7 @@ static int get_probes(struct srd_decoder *d, char *attr, GSList **pl)
                }
 
                if (!(p = g_try_malloc(sizeof(struct srd_probe)))) {
+                       srd_err("Failed to g_malloc() struct srd_probe.");
                        ret = SRD_ERR_MALLOC;
                        goto err_out;
                }
@@ -138,7 +139,7 @@ SRD_API int srd_load_decoder(const char *name, struct srd_decoder **dec)
        py_basedec = py_method = py_attr = NULL;
 
        if (!(d = g_try_malloc0(sizeof(struct srd_decoder)))) {
-               srd_dbg("Failed to malloc struct srd_decoder.");
+               srd_dbg("Failed to g_malloc() struct srd_decoder.");
                ret = SRD_ERR_MALLOC;
                goto err_out;
        }
@@ -335,7 +336,7 @@ SRD_API int srd_unload_decoder(struct srd_decoder *dec)
         * but they could be anywhere in the stack, just free the entire
         * stack. A frontend reloading a decoder thus has to restart all
         * instances, and rebuild the stack. */
-       srd_instance_free_all(NULL);
+       srd_inst_free_all(NULL);
 
        free_probes(dec->probes);
        free_probes(dec->opt_probes);