X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fanalog.c;h=9e01566f8799b1e572d2e188e324391696b00569;hb=HEAD;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; }