sysrepo BUGFIX avoid segfault if conn is NULL
@@ -96,6 +96,7 @@ error1:
static void
sr_conn_free(sr_conn_ctx_t *conn)
{
+ if (conn) {
ly_ctx_destroy(conn->ly_ctx, NULL);
pthread_mutex_destroy(&conn->ptr_lock);
if (conn->main_shm_create_lock > -1) {
@@ -106,6 +107,7 @@ sr_conn_free(sr_conn_ctx_t *conn)
sr_shm_clear(&conn->ext_shm);
free(conn);
}
+}
API int
sr_connect(const sr_conn_options_t opts, sr_conn_ctx_t **conn_p)
