]> sigrok.org Git - libsigrok.git/blobdiff - output/ols.c
sr: g_free()/g_string_free() can handle NULL input.
[libsigrok.git] / output / ols.c
index 16b288aca1bdf2116edc62176baa43f29b5239f9..8cc613ac6f709fe0dc0085c45ba1c12be36797ea 100644 (file)
@@ -85,8 +85,7 @@ static int event(struct sr_output *o, int event_type, char **data_out,
        ctx = o->internal;
 
        if (ctx && event_type == SR_DF_END) {
-               if (ctx->header)
-                       g_string_free(ctx->header, TRUE);
+               g_string_free(ctx->header, TRUE);
                free(o->internal);
                o->internal = NULL;
        }