Commit bb7d85be authored by Felix Hamann's avatar Felix Hamann

fix: when init fails, stat handle must be present

parent 7f2565cd
......@@ -148,6 +148,8 @@ samd_new (
assert (self->client_rep);
sam_log_tracef ("bound public endpoint '%s'", endpoint);
self->stat = sam_stat_handle_new ();
rc = sam_init (self->sam, &cfg);
if (rc) {
if (cfg) {
......@@ -158,8 +160,6 @@ samd_new (
return NULL;
}
self->stat = sam_stat_handle_new ();
sam_log_info ("created samd");
return self;
}
......
Markdown is supported
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