diff options
author | Rickard Green <[email protected]> | 2010-12-16 11:27:23 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-12-16 11:27:23 +0100 |
commit | 766c7cabb1545418bf59e8dcfcc1a5fae8b01d40 (patch) | |
tree | 12e258f0f426e7a1d57b0f4d4bd2db5b77523868 | |
parent | 99e34bba1a60b262e24496cc9288b549360c6377 (diff) | |
download | otp-766c7cabb1545418bf59e8dcfcc1a5fae8b01d40.tar.gz otp-766c7cabb1545418bf59e8dcfcc1a5fae8b01d40.tar.bz2 otp-766c7cabb1545418bf59e8dcfcc1a5fae8b01d40.zip |
Fix rwlock resource leak when hitting system limit
-rw-r--r-- | erts/emulator/beam/erl_db.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c index 8577354d27..0dfc0e721f 100644 --- a/erts/emulator/beam/erl_db.c +++ b/erts/emulator/beam/erl_db.c @@ -1436,8 +1436,7 @@ BIF_RETTYPE ets_new_2(BIF_ALIST_2) "** Too many db tables **\n"); free_heir_data(tb); tb->common.meth->db_free_table(tb); - erts_db_free(ERTS_ALC_T_DB_TABLE, tb, (void *) tb, sizeof(DbTable)); - ERTS_ETS_MISC_MEM_ADD(-sizeof(DbTable)); + db_unref(tb, LCK_NONE); BIF_ERROR(BIF_P, SYSTEM_LIMIT); } |