X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=util.c;h=764474ba2a6e461814e53b574cd87dbecfb81dd9;hp=c1b90404cbd43fd513363de5de34599ed7453387;hb=a6c1c359dab0f707ecdc0bf7fcb7de9b7dabfd06;hpb=f6c7eade2b8853b3d525b5cc0402e89ca74c1908 diff --git a/util.c b/util.c index c1b9040..764474b 100644 --- a/util.c +++ b/util.c @@ -145,11 +145,7 @@ SRD_PRIV int py_str_as_str(const PyObject *py_str, char **outstr) goto err_out; } - if (!(*outstr = g_strdup(str))) { - srd_dbg("Failed to g_malloc() outstr."); - ret = SRD_ERR_MALLOC; - goto err_out; - } + *outstr = g_strdup(str); err_out: if (py_encstr)