[hipl-commit] [trunk] Rev 3524: Potential fix to a bug in hash table deinitialization as reported by Tatu Kilappa.

  • From: Miika Komu <miika@xxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Wed, 03 Feb 2010 12:11:47 +0200

Committer: Miika Komu <miika@xxxxxx>
Date: Wed Feb 03 12:10:26 2010 +0200
Revision: 3524
Revision-id: miika@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Potential fix to a bug in hash table deinitialization as reported by Tatu 
Kilappa.
  
  0xb7ca84ac in lh_insert () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
  (gdb) bt
  #0 0xb7ca84ac in lh_insert () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
  #1 0x080501cb in hip_receive_update (received_update_packet=0x92aef98, 
  src_addr=0xbf8b627c, dst_addr=0xbf8b626c, ha=0x92ac560, 
  sinfo=0xbf8b630c) at hipd/update.c:476
  #2 0x08068461 in hip_receive_control_packet (msg=0x92aef98, 
  src_addr=0xbf8b627c, dst_addr=0xbf8b626c, msg_info=0xbf8b630c, filter=1) 
  at hipd/input.c:746
  #3 0x080687d9 in hip_receive_udp_control_packet (msg=0x92aef98, 
  saddr=0xbf8b627c, daddr=0xbf8b626c, info=0xbf8b630c) at hipd/input.c:887
  #4 0x08051b1b in hipd_main (argc=<value optimized out>, argv=<value 
  optimized out>) at hipd/hipd.c:774
  #5 0x080520e9 in main (argc=2, argv=0xbf8b63f4) at hipd/hipd.c:919

Modified:
  M  hipd/hadb.c

=== modified file 'hipd/hadb.c'
--- hipd/hadb.c 2010-01-31 19:45:48 +0000
+++ hipd/hadb.c 2010-02-03 10:10:26 +0000
@@ -1459,7 +1459,6 @@
                list_del(address, ha->addresses_to_send_echo_request);
                HIP_FREE(address);
         }
-       hip_ht_uninit(ha->addresses_to_send_echo_request);
 }
 
 /**
@@ -1501,8 +1500,10 @@
        if (ha->rendezvous_addr)
                HIP_FREE(ha->rendezvous_addr);
 
-        if (ha->addresses_to_send_echo_request)
+        if (ha->addresses_to_send_echo_request) {
                 hip_remove_addresses_to_send_echo_request(ha);
+               hip_ht_uninit(ha->addresses_to_send_echo_request);
+       }
 
        if (ha->locator)
                free(ha->locator);

Other related posts:

  • » [hipl-commit] [trunk] Rev 3524: Potential fix to a bug in hash table deinitialization as reported by Tatu Kilappa. - Miika Komu