Revision 035f6acb proto/ospf/lsupd.c

View differences:

proto/ospf/lsupd.c
55 55
	      break;
56 56
	    case CMP_SAME:
57 57
              s_rem_node(SNODE en);
58
              if(en->lsa_body!=NULL) mb_free(en->lsa_body);
59
              en->lsa_body=NULL;
58 60
	      DBG("Removing from lsreq list for neigh %I\n", nn->rid);
59 61
	      ospf_hash_delete(nn->lsrqh,en);
60 62
	      if(EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE);
......
62 64
	      break;
63 65
	    case CMP_NEWER:
64 66
              s_rem_node(SNODE en);
67
              if(en->lsa_body!=NULL) mb_free(en->lsa_body);
68
              en->lsa_body=NULL;
65 69
	      DBG("Removing from lsreq list for neigh %I\n", nn->rid);
66 70
	      ospf_hash_delete(nn->lsrqh,en);
67 71
	      if(EMPTY_SLIST(nn->lsrql)) ospf_neigh_sm(nn, INM_LOADDONE);
......
91 95
        if((en=ospf_hash_find_header(nn->lsrth, hh))!=NULL)
92 96
        {
93 97
          s_rem_node(SNODE en);
98
          if(en->lsa_body!=NULL) mb_free(en->lsa_body);
99
          en->lsa_body=NULL;
94 100
          ospf_hash_delete(nn->lsrth, en);
95 101
        }
96 102
      }
......
416 422
              if((en=ospf_hash_find_header(ntmp->lsrth,&lsadb->lsa))!=NULL)
417 423
              {
418 424
                s_rem_node(SNODE en);
425
                if(en->lsa_body!=NULL) mb_free(en->lsa_body);
426
                en->lsa_body=NULL;
419 427
                ospf_hash_delete(ntmp->lsrth,en);
420 428
              }
421 429
          }
......
448 456
      if((en=ospf_hash_find_header(n->lsrth,&lsadb->lsa))!=NULL)
449 457
      {
450 458
        s_rem_node(SNODE en);
459
        if(en->lsa_body!=NULL) mb_free(en->lsa_body);
460
        en->lsa_body=NULL;
451 461
        ospf_hash_delete(n->lsrth, en);
452 462
        if(ifa->state==OSPF_IS_BACKUP)
453 463
        {

Also available in: Unified diff