int CheckIfAlreadySeen(StrBuf *guid) {
int found = 0;
struct UseTable ut;
- struct cdbdata *cdbut;
+ struct cdbdata cdbut;
int hash = HashLittle(ChrPtr(guid), StrLength(guid));
syslog(LOG_DEBUG, "usetable: CheckIfAlreadySeen(0x%8x)", hash);
cdbut = cdb_fetch(CDB_USETABLE, &hash, sizeof(hash));
- if (cdbut != NULL) {
+ if (cdbut.len > 0) {
found = 1;
- cdb_free(cdbut);
}
// (Re)write the record, to update the timestamp.