Oops. Missing NULL frees.
authorBen Laurie <ben@openssl.org>
Sun, 17 Jan 1999 14:19:31 +0000 (14:19 +0000)
committerBen Laurie <ben@openssl.org>
Sun, 17 Jan 1999 14:19:31 +0000 (14:19 +0000)
crypto/lhash/lhash.c
crypto/objects/o_names.c

index c8c29a8..73d5fdc 100644 (file)
@@ -176,6 +176,9 @@ LHASH *lh;
        unsigned int i;
        LHASH_NODE *n,*nn;
 
+       if(lh == NULL)
+           return;
+
        for (i=0; i<lh->num_nodes; i++)
                {
                n=lh->b[i];
index 8995869..a3b05d2 100644 (file)
@@ -219,6 +219,9 @@ static int free_type;
 static void names_lh_free(onp,type)
 OBJ_NAME *onp;
        {
+       if(onp == NULL)
+           return;
+
        if ((free_type < 0) || (free_type == onp->type))
                {
                OBJ_NAME_remove(onp->name,onp->type);