#53 Wrong check for allocation error in nattraversal.c

CVS snapshot
closed-fixed
None
5
2009-01-09
2006-07-04
Bruno Wagenseil
No

Should be checked for NULL instead of not NULL?

--- nattraversal.c.orig 2006-07-04 10:43:59.430965068 +0200
+++ nattraversal.c 2006-07-04 10:44:10.446002631 +0200
@@ -385,7 +385,7 @@
plog (LLV_ERROR, LOCATION, NULL, "Can't
allocate new KA list item\n");
return -1;
}
- if ((new_addr->dst = dupsaddr(dst)) != NULL) {
+ if ((new_addr->dst = dupsaddr(dst)) == NULL) {
racoon_free(new_addr);
plog (LLV_ERROR, LOCATION, NULL, "Can't
allocate new KA list item\n");
return -1;

Discussion

  • Logged In: YES
    user_id=105392

    Commited, thanks for the patch.

     
  • Timo Teras
    Timo Teras
    2009-01-09

    • assigned_to: nobody --> vanhu
    • status: open --> closed-fixed