artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33f9018
)
In case lh_OBJ_NAME_insert returns NULL due to a failed malloc, onp
author
mbuhl
<mbuhl@openbsd.org>
Tue, 8 Nov 2022 23:19:09 +0000
(23:19 +0000)
committer
mbuhl
<mbuhl@openbsd.org>
Tue, 8 Nov 2022 23:19:09 +0000
(23:19 +0000)
is leaked in OBJ_NAME_add.
ok tb
Found by CodeChecker.
lib/libcrypto/objects/o_names.c
patch
|
blob
|
history
diff --git
a/lib/libcrypto/objects/o_names.c
b/lib/libcrypto/objects/o_names.c
index
a9e5f85
..
2cdd2f3
100644
(file)
--- a/
lib/libcrypto/objects/o_names.c
+++ b/
lib/libcrypto/objects/o_names.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: o_names.c,v 1.2
2 2017/01/29 17:49:23 beck
Exp $ */
+/* $OpenBSD: o_names.c,v 1.2
3 2022/11/08 23:19:09 mbuhl
Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-197,6
+197,7
@@
OBJ_NAME_add(const char *name, int type, const char *data)
free(ret);
} else {
if (lh_OBJ_NAME_error(names_lh)) {
+ free(onp);
/* ERROR */
return (0);
}