Don't free blockdata for negative DS cache entries.

This commit is contained in:
Simon Kelley
2014-03-01 17:58:28 +00:00
parent bd9b3cf55b
commit e3f1455850
2 changed files with 2 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ static void cache_blockdata_free(struct crec *crecp)
else
blockdata_free(crecp->addr.key.keydata);
}
else if (crecp->flags & F_DS)
else if ((crecp->flags & F_DS) && !(crecp->flags & F_NEG))
blockdata_free(crecp->addr.ds.keydata);
}
#endif

View File

@@ -353,7 +353,7 @@ static void from_wire(char *name)
l[len] = '.';
}
if (l != name)
if ((char *)l != name)
*(l-1) = 0;
}