Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
BangBMC Firmware
hiomapd
Commits
6b8622a1
Commit
6b8622a1
authored
5 years ago
by
Jonathan Currier
Browse files
Options
Download
Email Patches
Plain Diff
Harden against null pointer derefs
parent
924c7581
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
protocol.c
protocol.c
+6
-2
No files found.
protocol.c
View file @
6b8622a1
...
...
@@ -61,7 +61,9 @@ int protocol_events_set(struct mbox_context *context, uint8_t bmc_event)
*/
context
->
bmc_events
|=
bmc_event
;
return
context
->
transport
->
ops
->
set_events
(
context
->
transport
,
bmc_event
,
mask
);
return
(
context
->
transport
)
?
context
->
transport
->
set_events
(
context
,
bmc_event
,
mask
)
:
(
mbox_log
(
LOG_ERR
,
"Called %s, but transport not assigned"
,
__func__
),
-
1
);
}
/*
...
...
@@ -78,7 +80,9 @@ int protocol_events_clear(struct mbox_context *context, uint8_t bmc_event)
context
->
bmc_events
&=
~
bmc_event
;
return
context
->
transport
->
ops
->
clear_events
(
context
->
transport
,
bmc_event
,
mask
);
return
(
context
->
transport
)
?
context
->
transport
->
ops
->
clear_events
(
context
->
transport
,
bmc_event
,
mask
)
:
(
mbox_log
(
LOG_ERR
,
"Called %s, but transport not assigned"
,
__func__
),
-
1
);
}
static
int
protocol_negotiate_version
(
struct
mbox_context
*
context
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment