projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement output text plugin (basic)
[babeltrace.git]
/
plugins
/
text
/
text.c
diff --git
a/plugins/text/text.c
b/plugins/text/text.c
index f17442892f563b61056b9af1cf07338a00dbf4eb..eca7ed73cfe05792df6fe05bc09314f14fe35544 100644
(file)
--- a/
plugins/text/text.c
+++ b/
plugins/text/text.c
@@
-59,6
+59,7
@@
const char *loglevel_str [] = {
static
void destroy_text_data(struct text_component *text)
{
static
void destroy_text_data(struct text_component *text)
{
+ (void) g_string_free(text->string, TRUE);
g_free(text);
}
g_free(text);
}
@@
-71,8
+72,16
@@
struct text_component *create_text(void)
if (!text) {
goto end;
}
if (!text) {
goto end;
}
+ text->string = g_string_new("");
+ if (!text->string) {
+ goto error;
+ }
end:
return text;
end:
return text;
+
+error:
+ g_free(text);
+ return NULL;
}
static
}
static
This page took
0.024847 seconds
and
4
git commands to generate.