[hipl-commit] [trunk] Rev 4558: hipd: fix a shadowing issue in the message handling routine.

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Tue, 18 May 2010 15:25:39 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 18/05/2010 at 15:25:39
Revision: 4558
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  hipd: fix a shadowing issue in the message handling routine.

Modified:
  M  hipd/user.c

=== modified file 'hipd/user.c'
--- hipd/user.c 2010-05-16 21:02:09 +0000
+++ hipd/user.c 2010-05-18 12:25:01 +0000
@@ -543,16 +543,16 @@
         /* Workaround for bug id 880 until bug id 589 is implemented.
          * -miika  */
         if (entry->state != HIP_STATE_NONE || HIP_STATE_UNASSOCIATED) {
-            hip_common_t *msg = calloc(HIP_MAX_PACKET, 1);
-            HIP_IFE((msg == 0), -1);
-            HIP_IFE(hip_build_user_hdr(msg, HIP_MSG_RST, 0), -1);
-            HIP_IFE(hip_build_param_contents(msg,
+            hip_common_t *msg2 = calloc(HIP_MAX_PACKET, 1);
+            HIP_IFE((msg2 == 0), -1);
+            HIP_IFE(hip_build_user_hdr(msg2, HIP_MSG_RST, 0), -1);
+            HIP_IFE(hip_build_param_contents(msg2,
                                              &entry->hit_peer,
                                              HIP_PARAM_HIT,
                                              sizeof(hip_hit_t)),
                     -1);
-            hip_send_close(msg, 0);
-            free(msg);
+            hip_send_close(msg2, 0);
+            free(msg2);
         }
 
         /* Send a I1 packet to the server (registrar). */

Other related posts:

  • » [hipl-commit] [trunk] Rev 4558: hipd: fix a shadowing issue in the message handling routine. - Mircea Gherzan