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 c8c29a8d305d1806423a16c8edb85adc9241a2bd..73d5fdc45ea1bebc612c955d3e22d2bb1932f143 100644 (file)
@@ -176,6 +176,9 @@ LHASH *lh;
        unsigned int i;
        LHASH_NODE *n,*nn;
 
        unsigned int i;
        LHASH_NODE *n,*nn;
 
+       if(lh == NULL)
+           return;
+
        for (i=0; i<lh->num_nodes; i++)
                {
                n=lh->b[i];
        for (i=0; i<lh->num_nodes; i++)
                {
                n=lh->b[i];
index 8995869587b485dcdb0caa66dad675179388c7c0..a3b05d2dee9ed16d9d0ec228eef7d62b0a77a2f9 100644 (file)
@@ -219,6 +219,9 @@ static int free_type;
 static void names_lh_free(onp,type)
 OBJ_NAME *onp;
        {
 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);
        if ((free_type < 0) || (free_type == onp->type))
                {
                OBJ_NAME_remove(onp->name,onp->type);