diff options
-rw-r--r-- | mwrap_core.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mwrap_core.h b/mwrap_core.h index 09b7930..291a078 100644 --- a/mwrap_core.h +++ b/mwrap_core.h @@ -226,7 +226,8 @@ static struct src_loc *totals_add_rcu(struct src_loc *k) again: t = CMM_LOAD_SHARED(totals); - if (!t) goto out_unlock; + if (!t) return l; + assert(rcu_read_ongoing()); cds_lfht_lookup(t, k->hval, loc_eq, k, &iter); cur = cds_lfht_iter_get_node(&iter); if (cur) { @@ -236,7 +237,7 @@ again: } else { size_t n = loc_size(k); l = real_malloc(sizeof(*l) + n); - if (!l) goto out_unlock; + if (!l) return l; memcpy(l, k, sizeof(*l) + n); l->mtx = mutex_assign(); l->age_total = 0; @@ -252,7 +253,6 @@ again: goto again; } } -out_unlock: return l; } |