Commit ba4c6045 authored by Erik Jansson's avatar Erik Jansson
Browse files

Add error check after allocation.

parent 1fb90240
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment