X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fanalog.c;h=76ea659caf99ec54a33813a023c2d6a6f51279c8;hb=c78fa9cf9416260e018c131f72e9115302deba7f;hp=f5cc628500138f5a5dd901b3240629abbaf8dbfb;hpb=e62b284c1c36ee21cc35a6c2974db2d8233c8769;p=libsigrok.git diff --git a/src/analog.c b/src/analog.c index f5cc6285..76ea659c 100644 --- a/src/analog.c +++ b/src/analog.c @@ -492,8 +492,7 @@ SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog *analog, if (analog->meaning->mqflags & mq_strings[i].value) g_string_append(buf, mq_strings[i].str); - *result = buf->str; - g_string_free(buf, FALSE); + *result = g_string_free(buf, FALSE); return SR_OK; }