Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Robotlab
firefly
Commits
ba4c6045
Commit
ba4c6045
authored
May 05, 2014
by
Erik Jansson
Browse files
Add error check after allocation.
parent
1fb90240
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/protocol/firefly_protocol_connection.c
View file @
ba4c6045
...
...
@@ -120,7 +120,9 @@ int firefly_connection_open(
struct
firefly_connection
*
conn
;
conn
=
firefly_connection_new
(
actions
,
memory_replacements
,
event_queue
,
tc
);
firefly_connection_set_context
(
conn
,
context
);
if
(
conn
)
{
firefly_connection_set_context
(
conn
,
context
);
}
return
conn
!=
NULL
?
conn
->
event_queue
->
offer_event_cb
(
conn
->
event_queue
,
FIREFLY_PRIORITY_HIGH
,
firefly_connection_open_event
,
conn
,
0
,
NULL
)
:
-
1
;
...
...
Write
Preview
Supports
Markdown
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