projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Fix: sessiond: rotation trigger leak"
[lttng-tools.git]
/
src
/
common
/
tracker.c
diff --git
a/src/common/tracker.c
b/src/common/tracker.c
index 0f69c775b75f6d1c08e213fa547bcbbf5feb7daa..734fbd3093e273702860fd488e9a548d8c8b9dfe 100644
(file)
--- a/
src/common/tracker.c
+++ b/
src/common/tracker.c
@@
-20,7
+20,7
@@
struct process_attr_tracker_values_comm_header {
uint32_t count;
struct process_attr_tracker_values_comm_header {
uint32_t count;
-};
+}
LTTNG_PACKED
;
struct process_attr_tracker_value_comm {
/* enum lttng_process_attr_value_type */
struct process_attr_tracker_value_comm {
/* enum lttng_process_attr_value_type */
@@
-30,7
+30,7
@@
struct process_attr_tracker_value_comm {
/* Includes the '\0' terminator. */
uint32_t name_len;
} value;
/* Includes the '\0' terminator. */
uint32_t name_len;
} value;
-};
+}
LTTNG_PACKED
;
#define GET_INTEGRAL_COMM_VALUE(value_ptr, as_type) \
((as_type)(is_signed(as_type) ? (value_ptr)->u._signed : \
#define GET_INTEGRAL_COMM_VALUE(value_ptr, as_type) \
((as_type)(is_signed(as_type) ? (value_ptr)->u._signed : \
@@
-103,10
+103,12
@@
enum lttng_error_code process_attr_value_from_comm(
}
/* Only expect a payload for name value types. */
}
/* Only expect a payload for name value types. */
- if (is_value_type_name(value_type) && value_view->size == 0) {
+ if (is_value_type_name(value_type) &&
+ (!value_view || value_view->size == 0)) {
ret = LTTNG_ERR_INVALID_PROTOCOL;
goto error;
ret = LTTNG_ERR_INVALID_PROTOCOL;
goto error;
- } else if (!is_value_type_name(value_type) && value_view->size != 0) {
+ } else if (!is_value_type_name(value_type) && value_view &&
+ value_view->size != 0) {
ret = LTTNG_ERR_INVALID_PROTOCOL;
goto error;
}
ret = LTTNG_ERR_INVALID_PROTOCOL;
goto error;
}
This page took
0.023727 seconds
and
4
git commands to generate.