projects
/
lttng-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d28f6a9
)
Fix: possible use after free
author
David Goulet
<dgoulet@efficios.com>
Thu, 5 Dec 2013 22:05:40 +0000
(17:05 -0500)
committer
David Goulet
<dgoulet@efficios.com>
Thu, 5 Dec 2013 22:09:07 +0000
(17:09 -0500)
Fixes coverity issue
1135328
and
1135329
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/ust-app.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/lttng-sessiond/ust-app.c
b/src/bin/lttng-sessiond/ust-app.c
index c7bcc85f5e0b8fed7ef9aeff108f3fb630517e95..d1fa0d09cb2b04d75b3419cd6fa969a602253eb0 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-app.c
+++ b/
src/bin/lttng-sessiond/ust-app.c
@@
-3125,7
+3125,6
@@
int ust_app_list_events(struct lttng_event **events)
&uiter)) != -LTTNG_UST_ERR_NOENT) {
/* Handle ustctl error. */
if (ret < 0) {
&uiter)) != -LTTNG_UST_ERR_NOENT) {
/* Handle ustctl error. */
if (ret < 0) {
- free(tmp_event);
if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
ERR("UST app tp list get failed for app %d with ret %d",
app->sock, ret);
if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
ERR("UST app tp list get failed for app %d with ret %d",
app->sock, ret);
@@
-3138,6
+3137,7
@@
int ust_app_list_events(struct lttng_event **events)
*/
break;
}
*/
break;
}
+ free(tmp_event);
goto rcu_error;
}
goto rcu_error;
}
@@
-3225,7
+3225,6
@@
int ust_app_list_event_fields(struct lttng_event_field **fields)
&uiter)) != -LTTNG_UST_ERR_NOENT) {
/* Handle ustctl error. */
if (ret < 0) {
&uiter)) != -LTTNG_UST_ERR_NOENT) {
/* Handle ustctl error. */
if (ret < 0) {
- free(tmp_event);
if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
ERR("UST app tp list field failed for app %d with ret %d",
app->sock, ret);
if (ret != -LTTNG_UST_ERR_EXITING && ret != -EPIPE) {
ERR("UST app tp list field failed for app %d with ret %d",
app->sock, ret);
@@
-3234,10
+3233,11
@@
int ust_app_list_event_fields(struct lttng_event_field **fields)
/*
* This is normal behavior, an application can die during the
* creation process. Don't report an error so the execution can
/*
* This is normal behavior, an application can die during the
* creation process. Don't report an error so the execution can
- * continue normally.
+ * continue normally.
Reset list and count for next app.
*/
break;
}
*/
break;
}
+ free(tmp_event);
goto rcu_error;
}
goto rcu_error;
}
This page took
0.030267 seconds
and
4
git commands to generate.