projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: segfault on error handling
[babeltrace.git]
/
converter
/
babeltrace.c
diff --git
a/converter/babeltrace.c
b/converter/babeltrace.c
index de9b49600fc5e0543690bc2104bfc6f194195e82..a6c1f548677127f44691c2dd28e68982222a74a2 100644
(file)
--- a/
converter/babeltrace.c
+++ b/
converter/babeltrace.c
@@
-327,7
+327,7
@@
int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
GArray *trace_ids;
char lpath[PATH_MAX];
char * const paths[2] = { lpath, NULL };
GArray *trace_ids;
char lpath[PATH_MAX];
char * const paths[2] = { lpath, NULL };
- int ret;
+ int ret
= -1
;
/*
* Need to copy path, because fts_open can change it.
/*
* Need to copy path, because fts_open can change it.
@@
-393,7
+393,7
@@
int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
}
g_array_free(trace_ids, TRUE);
}
g_array_free(trace_ids, TRUE);
- return
0
;
+ return
ret
;
error:
return ret;
error:
return ret;
@@
-420,7
+420,7
@@
int convert_trace(struct trace_descriptor *td_write,
goto error_iter;
}
while ((ctf_event = bt_ctf_iter_read_event(iter))) {
goto error_iter;
}
while ((ctf_event = bt_ctf_iter_read_event(iter))) {
- ret = sout->parent.event_cb(&sout->parent, ctf_event->stream);
+ ret = sout->parent.event_cb(&sout->parent, ctf_event->
parent->
stream);
if (ret) {
fprintf(stderr, "[error] Writing event failed.\n");
goto end;
if (ret) {
fprintf(stderr, "[error] Writing event failed.\n");
goto end;
This page took
0.025459 seconds
and
4
git commands to generate.