Fix a mem leak on an error path in OBJ_NAME_add()
authorMatt Caswell <matt@openssl.org>
Mon, 9 May 2016 16:44:26 +0000 (17:44 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 23 May 2016 23:12:04 +0000 (00:12 +0100)
commit649af484c8a15ad916c101aba86c7529dac7eccb
treedc829ecb2df894d6cf2bc0d0dfbaa34e74f310f1
parente117522e752478a1fbb87117e4660ee20b85acc2
Fix a mem leak on an error path in OBJ_NAME_add()

If lh_OBJ_NAME_insert() fails then the allocated |onp| value is leaked.

RT#2238

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 0a618df059d93bf7fe9e3ec92e04db8bc1eeff07)
crypto/objects/o_names.c