fix double-free on error path
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 22 Oct 2012 22:23:09 +0000 (18:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 22 Oct 2012 22:23:09 +0000 (18:23 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/ctf.c

index ccc103c586d612cda7877e9168c6c5da22565a8e..37e314849c611844065e0605ef7fa3dbfafabce9 100644 (file)
@@ -1028,7 +1028,6 @@ int ctf_open_trace_metadata_read(struct ctf_trace *td,
                metadata_stream->pos.fd = openat(td->dirfd, "metadata", O_RDONLY);
                if (metadata_stream->pos.fd < 0) {
                        fprintf(stderr, "Unable to open metadata.\n");
                metadata_stream->pos.fd = openat(td->dirfd, "metadata", O_RDONLY);
                if (metadata_stream->pos.fd < 0) {
                        fprintf(stderr, "Unable to open metadata.\n");
-                       g_free(metadata_stream);
                        ret = -1;
                        goto end_free;
                }
                        ret = -1;
                        goto end_free;
                }
This page took 0.02586 seconds and 4 git commands to generate.