summaryrefslogtreecommitdiffstats
path: root/apps/srp.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2017-02-19 20:13:45 +0100
committerRich Salz <rsalz@openssl.org>2017-02-21 20:13:58 +0100
commit0fbaef9e64fa10446aff805791befaa2b967e322 (patch)
tree1b232451b3812ef0789354e2b132be27fb0790de /apps/srp.c
parentFix a few memleaks in TXT_DB. (diff)
downloadopenssl-0fbaef9e64fa10446aff805791befaa2b967e322.tar.xz
openssl-0fbaef9e64fa10446aff805791befaa2b967e322.zip
Fix some more memory leaks with TXT_DB_insert.
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2684)
Diffstat (limited to 'apps/srp.c')
-rw-r--r--apps/srp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/srp.c b/apps/srp.c
index b213c6010d..be4a4b43d3 100644
--- a/apps/srp.c
+++ b/apps/srp.c
@@ -92,10 +92,8 @@ static int update_index(CA_DB *db, char **row)
int i;
irow = app_malloc(sizeof(*irow) * (DB_NUMBER + 1), "row pointers");
- for (i = 0; i < DB_NUMBER; i++) {
+ for (i = 0; i < DB_NUMBER; i++)
irow[i] = row[i];
- row[i] = NULL;
- }
irow[DB_NUMBER] = NULL;
if (!TXT_DB_insert(db->db, irow)) {