Implement ctf.lttng-live component
[babeltrace.git] / plugins / ctf / common / metadata / decoder.c
index 81d6ddef7837e0127efdbd8f3a2e70223fc95941..41badbb6412719ab063ce90b282b309f2436f89a 100644 (file)
@@ -248,6 +248,7 @@ error:
 
        if (*buf) {
                free(*buf);
+               *buf = NULL;
        }
 
 end:
@@ -320,6 +321,11 @@ enum ctf_metadata_decoder_status ctf_metadata_decoder_decode(
                        goto end;
                }
 
+               if (strlen(buf) == 0) {
+                       /* An empty metadata packet is OK. */
+                       goto end;
+               }
+
                /* Convert the real file pointer to a memory file pointer */
                fp = bt_fmemopen(buf, strlen(buf), "rb");
                close_fp = true;
This page took 0.023889 seconds and 4 git commands to generate.